Es macht nicht viel Sinn, warum das FROM-Feld nicht so gesendet wurde, wie es sein sollte.E-Mail 'von' Feld wurde falsch eingestellt mit phpmailer 5.2
Dies ist der 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 = "[email protected]";
$mail->Password = "***";
$address = "[email protected]";
$mail->AddAddress($address, "Guilherme");
$mail->SetFrom("[email protected]", "from you"); //<------ HERE
$mail->AddReplyTo("[email protected]", "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!";
}
Die E-Mail ist ich bin Empfangs dass:
ich die neueste Version 5.2 PHPMailer
Überprüfen Sie mit $ mail-> Von = "[email protected]"; $ mail-> FromName = "Vollständiger Name"; Es funktioniert –
Es tut mir leid, aber ich bekomme das gleiche Ergebnis. Von E-Mail ist als [email protected] gesetzt –
Unrelated Problem: Sie haben einen Tippfehler. 'SMTPSecure' sollte' 'tls'' sein, nicht' tsl'. – Synchro