I am trying to send mail with PHPmailer and gmail. But when I send mail from my gmail account, and not without reply. How to set no-reply as?
The code I have is:
$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();
Received mail (headers):
Return-Path: <myAccount@web.com>
Which should be no-reply@web.com
Thanks in advance
John source
share