我正在尝试使用 PHPmailer 和 gmail 发送邮件。但是,当我从我的 gmail 帐户发送邮件而不是不回复时。如何将无回复设置为来自?
我有的代码:
$mail = new PHPMailer();
$mail->Mailer = "smtp";
$mail->Host = "ssl://smtp.gmail.com";
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username = "myAccount@web.com";
$mail->Password = "password";
$mail->From = "no-reply@web.com";
$mail->AddAddress($to);
$mail->AddReplyTo("no-reply@web.com","no-reply");
$mail->Subject = $subject;
$mail->Body = $msg;
$mail->WordWrap = 150;
$mail->send();
我收到的邮件(标题):
Return-Path: <myAccount@web.com>
应该是 no-reply@web.com
提前致谢