1
我試圖在php郵件程序(gmail smtp)中設置從。但在收件箱中,它顯示來自[email protected]。這裏是我的代碼:如何使用Gmail SMTP設置FROM郵件發件人
$this->_mail->Username = "[email protected]";
//Password to use for SMTP authentication
$this->_mail->Password = 'mypassword';
$this->_mail->From="[email protected]";
$this->_mail->FromName="Support Team";
//Set who the message is to be sent from
$this->_mail->setFrom('[email protected]', 'Support Team',false);
但是,當我收到的電子郵件收件箱中的顯示從:[email protected] ,我想顯示來自:[email protected]
誰能幫我找出我缺少的東西。
我認爲這可能是Gmail的限制。 「發件人」電子郵件地址必須與其來自的地址相匹配,或者由Google SMTP自動設置。 – Anderscc
[PHPMailer $ mail->可能的副本不符合gmail的標頭](http://stackoverflow.com/questions/17001294/phpmailer-mail-from-headers-not-working-with-gmail) – Synchro