【发布时间】:2011-08-28 10:58:33
【问题描述】:
我有以下代码:
$this->Email->smtpOptions = Configure::read("Email.smtpOptions");
$this->Email->delivery = 'smtp';
$this->Email->sendAs = "html";
$this->Email->from = $_POST['name'] . ' <' . $_POST['email'] . '>';
$this->Email->replyTo = $_POST['name'] . ' <' . $_POST['email'] . '>';
$this->Email->to = CONTACTEMAIL;
$this->Email->subject = WEBSITEURL . " - Contact Form";
$this->Email->template = "contactform";
唯一的小问题是,当查看实际发送电子邮件的人时,电子邮件地址是我用来连接 GMAIL SMTP 的地址,名称实际上很好。感谢replyTo属性,点击回复时,收件人地址很好,但我真的很想知道是否有可能像我设置的那样拥有发件人地址。?
【问题讨论】:
标签: php email cakephp gmail cakephp-1.3