To enclose the email address in <> is required for the RCPT TO Field, according to RFC 821. Since we do not use these <>'s within the TO Field while using the mail function (some servers are having problems with this) we need to re-add them within the smtpmail function.

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4183 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-06-28 11:32:48 +00:00
parent 5a3f9d3bac
commit 305eb6c34a

View file

@ -153,10 +153,10 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
$mail_to_address = trim($mail_to_address);
if (preg_match('#[^ ]+\@[^ ]+#', $mail_to_address))
{
fputs($socket, "RCPT TO: $mail_to_address\r\n");
fputs($socket, "RCPT TO: <$mail_to_address>\r\n");
server_parse($socket, "250", __LINE__);
}
$to_header .= (($to_header != '') ? ', ' : '') . "$mail_to_address";
$to_header .= (($to_header != '') ? ', ' : '') . "<$mail_to_address>";
}
// Ok now do the CC and BCC fields...