1
發送郵件我想在time.My代碼發送郵件的收件人之一是這樣的:收件人收到兩次相同的郵件,而在警予1.1
$message = new YiiMailMessage;
$message->view = "mail";
$params = array('sendEmail'=>$values);
$message->subject = $values['subject'];
$message->setBody($params, 'text/html');
$message->from =$values['email_from'] ;
$message->addTo($values['email_to']);
if(Yii::app()->mail->send($message)){
Yii::app()->user->setFlash('success','Success sending email. ');
$this->redirect(array('mail/admin'));
}else{
Yii::app()->user->setFlash('error','Error while sending email. ');
}
郵件被收件人收到,但相同的郵件接收兩次。