0
我使用PHPmailer從網站向網站所有者發送電子郵件。它對一些地址(例如我的Gmail帳戶)可以正常工作,並且它曾經適用於所有者的地址,但他最近從POP更改爲IMAP,現在他沒有收到來自網站的電子郵件。他確實收到來自其他來源的電子郵件。這是代碼:PHP電子郵件到IMAP帳戶
$mail = new PHPMailer(true);
try {
$mail->AddAddress($to, 'Example To');
$mail->SetFrom('[email protected]', 'Example');
$mail->AddReplyTo('[email protected]', 'Example');
$mail->Subject = $subject;
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML($message);
$mail->Send();
//echo "Message Sent OK</p>\n";
} catch (phpmailerException $e) {
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
echo $e->getMessage(); //Boring error messages from anything else!
}
任何意見非常讚賞。 謝謝! G
感謝您的回覆 - 我會深入瞭解一下轉換過程中發生的情況。 – GluePear 2010-12-07 15:15:22