【发布时间】:2014-03-21 15:02:44
【问题描述】:
当雅虎用户在我的网站注册时,我尝试向他们发送电子邮件,但电子邮件为空。
所以我尝试编辑电子邮件类并将 send_multipart 变量设置为 FALSE。但没有任何改变。
我使用我的 smtp 服务器和其他电子邮件客户端,一切正常。
有什么想法吗?
我这样发送电子邮件:
$email_content = array(
'email' => $email,
'subject' => lang('email_subject'),
'template' => 'auth/email/email_template'
);
$this->send_mail($email_content);
电子邮件模板:
<html>
<body>
<h1>title</h1>
<p>welcome, this is a test message</p>
</body>
</html>
在雅虎邮箱中,我看到了:
<h1></h1>
<p></p>
还有我的 send_mail 函数:
public function send_mail($data)
{
$this->load->library('email');
$message = $this->load->view($data['template'], $data, true);
$this->email->from('no-reply@mysite.com', 'Mysite.com');
$this->email->to($data['email']);
$this->email->subject('Mysite.com - ' . $data['subject']);
$this->email->message($message);
if ($this->email->send())
{
return true;
}else
{
return false;
}
}
【问题讨论】:
-
为什么是这个负值?
-
建议?当然。提问时,请务必包含人们为您提供良好、有用的答案所需的所有信息。没有任何代码,没有任何关于应该发生什么以及正在发生什么的详细解释......你不太可能得到回应。
-
邮件内容是什么?如果您查看 Yahoo (luxsci.com/blog/…) 中的电子邮件来源,您会看到什么?
-
刚刚编辑了我的初始帖子
标签: php codeigniter email yahoo