escape lines starting with dot in smtp client session

This commit is contained in:
Michael Volz 2017-07-05 13:35:22 +02:00 committed by Janos SUTO
parent 17f21f1bc3
commit cab8a86816

View File

@ -12,6 +12,8 @@ class ModelMailMail extends Model {
$msg = preg_replace("/Message-ID:([^\n]+)\n/i", "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">\n", $msg); $msg = preg_replace("/Message-ID:([^\n]+)\n/i", "Message-ID: <" . generate_random_string(25) . '@' . SITE_NAME . ">\n", $msg);
} }
$msg = preg_replace("/^\..*$/m", ".$0", $msg);
$r = fsockopen($smtphost, $smtpport); $r = fsockopen($smtphost, $smtpport);
if(!$r){ return -1; } if(!$r){ return -1; }