From 305eb6c34a1f1842dfa8749a65c1e7e9a4e4ddb8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 28 Jun 2003 11:32:48 +0000 Subject: [PATCH] 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 --- phpBB/includes/smtp.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/smtp.php b/phpBB/includes/smtp.php index 17c3ef6706..ca8c45144f 100644 --- a/phpBB/includes/smtp.php +++ b/phpBB/includes/smtp.php @@ -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...