使用Codeigniter 3在电子邮件的页脚添加徽标图像



我正在尝试将徽标添加到电子邮件的末尾(关于部分(,但我只能发送图像链接,请帮助我,提前感谢,感谢您的宝贵时间。

这是我的代码

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("rn");                
$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());
}
}

电子邮件发送成功,但i图像未加载。

$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">

';

您只需要更改您的URL并添加基本URL即可

最新更新