diff options
| author | the_systech <the_systech@users.sourceforge.net> | 2002-03-12 17:36:08 +0000 |
|---|---|---|
| committer | the_systech <the_systech@users.sourceforge.net> | 2002-03-12 17:36:08 +0000 |
| commit | efc74bc4f0b76321014b0299f3539099e3d57876 (patch) | |
| tree | 7f2868a315b331dfc0cff721a4b968bb0f0a9b39 /phpBB | |
| parent | 2cb19998075c7df3b12fe9fc0c5949deb0f796a2 (diff) | |
| download | forums-efc74bc4f0b76321014b0299f3539099e3d57876.tar forums-efc74bc4f0b76321014b0299f3539099e3d57876.tar.gz forums-efc74bc4f0b76321014b0299f3539099e3d57876.tar.bz2 forums-efc74bc4f0b76321014b0299f3539099e3d57876.tar.xz forums-efc74bc4f0b76321014b0299f3539099e3d57876.zip | |
Fix for various smtp issues reported in bugtracker
git-svn-id: file:///svn/phpbb/trunk@2295 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/smtp.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/phpBB/includes/smtp.php b/phpBB/includes/smtp.php index 5798eee405..771025b495 100644 --- a/phpBB/includes/smtp.php +++ b/phpBB/includes/smtp.php @@ -153,7 +153,7 @@ function smtpmail($mail_to, $subject, $message, $headers = "") // From this point onward most server response codes should be 250 // Specify who the mail is from.... - fputs($socket, "MAIL FROM: " . $board_config['board_email'] . "\r\n"); + fputs($socket, "MAIL FROM: <" . $board_config['board_email'] . ">\r\n"); server_parse($socket, "250"); // Specify each user to send to and build to header. @@ -165,9 +165,9 @@ function smtpmail($mail_to, $subject, $message, $headers = "") // Add an additional bit of error checking to the To field. // $mail_to_address = trim($mail_to_address); - if ( preg_match('/.+\@.+/', $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" ); } $to_header .= "<$mail_to_address>, "; @@ -180,9 +180,9 @@ function smtpmail($mail_to, $subject, $message, $headers = "") // Add an additional bit of error checking to bcc header... // $bcc_address = trim( $bcc_address ); - if ( preg_match('/.+\@.+/', $bcc_address) ) + if ( preg_match('/[^ ]+\@[^ ]+/', $bcc_address) ) { - fputs( $socket, "RCPT TO: $bcc_address\r\n" ); + fputs( $socket, "RCPT TO: <$bcc_address>\r\n" ); server_parse( $socket, "250" ); } } @@ -193,9 +193,9 @@ function smtpmail($mail_to, $subject, $message, $headers = "") // Add an additional bit of error checking to cc header // $cc_address = trim( $cc_address ); - if ( preg_match('/.+\@.+/', $cc_address) ) + if ( preg_match('/[^ ]+\@[^ ]+/', $cc_address) ) { - fputs($socket, "RCPT TO: $cc_address\r\n"); + fputs($socket, "RCPT TO: <$cc_address>\r\n"); server_parse($socket, "250"); } } @@ -228,4 +228,4 @@ function smtpmail($mail_to, $subject, $message, $headers = "") return TRUE; } -?>
\ No newline at end of file +?> |
