smtp : manage the dot on first column : double it before sending the email
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2865 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
4
smtp.php
4
smtp.php
@@ -159,6 +159,10 @@ class smtp
|
||||
$this->putLine ("DATA\r\n");
|
||||
if (substr ($completeMail, -2) !== "\r\n")
|
||||
$completeMail .= "\r\n";
|
||||
// Dot on first column : must be doubled to not be detected as the end
|
||||
// of SMTP transaction. The SMTP server will remove it before distribute
|
||||
// http://tools.ietf.org/html/rfc5321#section-4.5.2
|
||||
$completeMail = preg_replace ("#^\.#m", "..", $completeMail);
|
||||
return $this->putLine ("$completeMail.\r\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user