我使用PHPMailer向一个或多个detinations发送一些电子邮件。 但是我遇到了一个问题。来了: 这是我的代码:
$mail2->AddAddress($cliemail);
$mail2->AddCC('important@destination.com');
$mail2->SetFrom('important@destination.com', "...");
$mail2->AddReplyTo('important@destination.com', "...");
$mail2->Subject = 'Email subject... '.$wnume;
$mail2->AltBody = 'To be able to see this email please...';
$mail2->MsgHTML(file_get_contents('contents.html'));
$mail2->AddAttachment('teste/quiz.pdf'); // attachment
$mail2->Send();
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage(); //Boring error messages from anything else!
}
所以,我的电子邮件必须从 important@destination.com 发送(当然这是另一封电子邮件) 并且它被发送到$ cliemail,但它没有到达CC( important@destination.com ) 显然我不能给自己发电子邮件......这是正常的吗?
可能是什么原因?
我尝试删除AddCC并尝试直接将电子邮件发送到 important@destination.com 但仍未到达。
为了能够收到我自己的电子邮件,我必须在电子邮件帐户中设置一些设置吗?
所以:
请帮忙