Hallo,
ich versende mit PHP über die Funktion mail() e-Mails. Dies funktioniert soweit auch ganz gut. Nur habe ich heute versucht eine e-Mail an einer Adresse bei yahoo zu senden und erhalte dann folgende Fehlermeldung:
Der dazugehörige PHP Code sieht wie folgt aus:
Wisst Ihr woran dies liegen könnte?
ich versende mit PHP über die Funktion mail() e-Mails. Dies funktioniert soweit auch ganz gut. Nur habe ich heute versucht eine e-Mail an einer Adresse bei yahoo zu senden und erhalte dann folgende Fehlermeldung:
...
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<....@yahoo.de>: host mx-eu.mail.am0.yahoodns.net[188.125.__.__] said:
554 Message not allowed - Headers are not RFC compliant[291] (in reply to
end of DATA command)
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<....@yahoo.de>: host mx-eu.mail.am0.yahoodns.net[188.125.__.__] said:
554 Message not allowed - Headers are not RFC compliant[291] (in reply to
end of DATA command)
PHP-Code:
$from = "info@domain.de";
$to = $_POST["mail"];
$betreff= "Test e-Mail";
$headers = array();
$headers[] = "MIME-Version: 1.0";
$headers[] = "Content-type: text/plain; charset=UTF-8";
$headers[] = "From: {$from}";
$headers[] = "Subject: {$betreff}";
$headers[] = "X-Mailer: PHP/".phpversion();
mail($to,$betreff,$message,implode("\r\n",$headers));
Kommentar