CAKEPHP 控制器代码:
for($i=0;$i<2;$i++) {
$to = 'pretesting@gmail.com';
$subject = 'Cloud Network Invitation';
$template = "email/join";
$activation_code = md5(uniqid($to, true));
$this->Email->reset();
$this->Email->delivery = 'debug';
$this->Email->to = $to;
$this->Email->from = 'pretesting2@gmail.com';
$this->Email->subject = $subject;
$this->Email->template = $template;
$this->set(compact('activation_code','to'));
$this->Email->send();
}
这是我第一次在我的“pretesting2@gmail.com”收件箱中收到这个
嗨,pretesting2@gmail.com
第二次,我在“pretesting2@gmail.com”收件箱中收到了这个
Hi, pretesting2@gmail.com
Hi, pretesting2@gmail.com
不明白,为什么第一封邮件内容附加到第二封邮件内容..