- 论坛徽章:
- 0
|
我在弄发一个简单的邮件。利用Email 组件来发送。代码如何:
$this->Email->from="aaron@sellingclub.cn";
$this->Email->to="277732751@qq.com";
$this->Email->replyTo = 'aaron@sellingclub.cn';
$this->Email->subject="发送测试邮件";
$this->Email->template="mail";
$this->Email->smtpOptions=array(
'port'=>'25',
'host'=>'mail.sellingclub.cn',
'timeout'=>'30',
'username'=>'aaron-sellingclub-cn',
'password'=>'Xqy6CNKKK',
//'client'=>'smtp.sellingclub.cn'
);
$this->Email->sendAs="both";
$this->Email->delivery="smtp";
$this->Email->send();
有问题吗?怎么发不了邮件。我在本地测试的。是不是和SMTP有关系呀? |
|