1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

lessons are made for those gaining experience from them...

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4186 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-06-30 17:18:38 +00:00
parent 305eb6c34a
commit 08da796e8e
6 changed files with 28 additions and 43 deletions

View File

@@ -150,13 +150,13 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
while(list(, $mail_to_address) = each($mail_to_array))
{
// Add an additional bit of error checking to the To field.
$mail_to_address = trim($mail_to_address);
$mail_to_address = ($mail_to_address == '') ? 'Undisclosed-recipients:;' : '<' . 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...