PHPMailer - Gmail smtp nie działa poprawnie

używamgmail smtp dlaFormularz kontaktowy w mojej witrynie (skrypt PHPMailerhttps://github.com/PHPMailer/PHPMailer)
mój kod to:

<?php
include "classes/class.phpmailer.php"; // include the class name
$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only
$mail->SMTPAuth = true; // authentication enabled
$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
$mail->Host = "smtp.gmail.com";
$mail->Port = 465; // or 587
$mail->IsHTML(true);
$mail->Username = "[email protected]";
$mail->Password = "xxxxxxxxxx";
$mail->SetFrom("[email protected]");
$mail->addReplyTo("[email protected]");
$mail->Subject = "Your Gmail SMTP Mail";
$mail->Body = "Hi, your first SMTP mail via gmail server has been received.";
$mail->AddAddress("[email protected]");
 if(!$mail->Send()){
  echo "Mailer Error: " . $mail->ErrorInfo;
}
else{
    echo "Message has been sent";
}
?>

Działa, ale mam dwa problemy:

ustawiłem$mail->SetFrom("[email protected]");
ale w moim pokazie gmailfrom: [email protected]

ustawiłem$mail->addReplyTo("[email protected]");
ale w moim gmailu, kiedy klikam przycisk odtwarzania wiadomości e-mail odtwarzany ponownie[email protected]
mój kod jest

questionAnswers(3)

yourAnswerToTheQuestion