我尝试使用 codeigniter 库发送电子邮件。简单的普通电子邮件工作完美,但只要我输入任何 URL,如 www.abc.com,codeigniter 就会给出电子邮件发送但我从未收到的消息。我没有运气将邮件类型更改为 HTML。
请有任何想法。
$this->load->library('email');
$config['mailtype'] = "html";
$config['charset'] = "utf-8";
$config['priority'] = "1";
$this->email->initialize($config);
$this->email->from("myemail@gmail.com", 'TS');
$this->email->to("myemail@gmail.com");
$this->email->subject('Test Email');
$txt_site_name = "www.google.com";
$this->email->message("This is test email with link --> ".$txt_site_name);
if($this->email->send())
{
echo "The email has been sent";
}else{
echo "Could not send the email";
show_error($this->email->print_debugger());
}