[英]Add logo image at footer of email using Codeigniter 3
im trying to add logo to end of email (in regards section), but i am able to send only image link, please help me out, thanks in advance, appreciating your valuable time.我试图在 email 的末尾添加徽标(关于部分),但我只能发送图片链接,请帮助我,提前感谢,感谢您的宝贵时间。
Here is my code这是我的代码
public function sendMailToClient(){
$subject = "park Group of Hotels.";
$message = '
<p>Hello'.$this->input->post('add_name').', <br>Greetings from park!<br> Thanks for choosing Hotel park! We aim to make your stay luxurious and comparting.
<br>
we will call and confirm you soon.You can also reach us on _+91 973255 </p>
<br>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
park Group of Hotels</div>
<img src="/hotelempark/assests/img/Logo_1.png" alt="Hotel Empark">
';
$this->load->library('email');
$this->email->set_newline("\r\n");
$this->email->from('abcd@gmail.com');
$this->email->to($this->input->post('email'));
$this->email->subject($subject);
$this->email->message($message);
// $this->email->cc('another@example.com');
// $this->email->bcc('and@another.com');
$mail= $this->email->send();
if($mail>0){
$this->session->set_flashdata('message', 'Thanks for Booking Room In Our Hotel, We will Call You Soon');
$this->email->to($this->input->post('add_email'));
}else{
show_error($this->email->print_debugger());
}
}
email is sending successfully but i images are not loading. email 发送成功,但我的图像没有加载。
$message = '
<p>Hello'.$this->input->post('add_name').', <br>Greetings from park!<br> Thanks for choosing Hotel park! We aim to make your stay luxurious and comparting.
<br>
we will call and confirm you soon.You can also reach us on _+91 973255 </p>
<br>
<br>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
park Group of Hotels</div>
<img src="https://www.Yourdomain.com/hotelempark/assests/img/Logo_1.png" alt="Hotel Empark">
';
You just have to change your URL and add base URL.您只需要更改 URL 并添加基础 URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.