Does not make much sense why FROM field is not been sent as it should be.
This is the code:
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
//$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "tsl";
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->Username = "gui.desenvolvedor@gmail.com";
$mail->Password = "***";
$address = "gui.desenvolvedor@gmail.com";
$mail->AddAddress($address, "Guilherme");
$mail->SetFrom("from@from.com.br", "from you"); //<------ HERE
$mail->AddReplyTo("reply@reply.com.br", "reply be");
$mail->Subject = "Email enviado pelo site.";
$mail->AltBody = $mensagem;
$mail->MsgHTML($mensagem);
if(!$mail->Send()) {
echo "Mailer Erro: " . $mail->ErrorInfo;
} else {
echo "Mensagem Enviada!";
}
The e-mail I´m receiving is that:
I am using the latest version phpMailer 5.2