我寫了一個PHP腳本,它發送郵件。我從「[email protected]」發送郵件,並將「返回路徑」設置爲「[email protected]」,但我仍然收到發件人郵件的郵件(「[email protected]」 「)。PHPMailer反彈郵件沒有得到反彈
這裏被剝離下來代碼:
$this->mail = new PHPMailer();
$this->mail->isSMTP();
$this->mail->Host = 'host';
$this->mail->SMTPAuth = true;
$this->mail->Username = '[email protected]';
$this->mail->Password = 'pass';
$this->mail->SMTPSecure = 'tls';
$this->mail->Port = 25;
$this->mail->ReturnPath = '[email protected]';
$this->mail->From = '[email protected]';
$this->mail->send();
我怎麼能強迫反彈郵件去反彈郵件帳戶?謝謝你的幫助!
對我來說這一個工作,$
Sender
是,當你調用setFrom
,但是你可以重寫它,只是把它直接,這樣的自動設置mail-> Sender ='[email protected]';因此,您的答案很可憐,我們不接受... – Terradon 2015-10-06 22:21:26我使用PHP_Mailer 5.2.10,我的PHP版本是5.4.9。 「$ this-> mail-> Sender」不適合我。所有退回的電子郵件都將返回到「$ this-> mail-> AddReplyTo」地址。這是否($ this-> mail-> AddReplyTo)導致「$ this-> mail-> Sender」的任何問題發揮作用? – Kiran 2016-03-18 15:32:12
爲什麼使用PHP和PHPMailer的老版本,buggy,不安全的版本?除此之外,還有很多郵件服務器會做錯事情。 – Synchro 2016-03-18 16:18:02