mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
small change in handling recipients. ;)
git-svn-id: file:///svn/phpbb/trunk@4775 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
65f837c379
commit
d170696d68
1 changed files with 34 additions and 21 deletions
|
@ -675,7 +675,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
|
|||
|
||||
if ($smtp->save_session)
|
||||
{
|
||||
$smtp->fp = fopen('cache/session.txt', 'w');
|
||||
$smtp->fp = fopen('cache/session.txt', 'a');
|
||||
fwrite($smtp->fp, 'Connecting to ' . $config['smtp_host'] . ':' . $config['smtp_port'] . "\r\n");
|
||||
}
|
||||
|
||||
|
@ -712,6 +712,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
|
|||
$cc_header = implode(', ', $mail_cc);
|
||||
|
||||
// Now tell the MTA to send the Message to the following people... [TO, BCC, CC]
|
||||
$rcpt = false;
|
||||
foreach ($mail_rcpt as $type => $mail_to_addresses)
|
||||
{
|
||||
foreach ($mail_to_addresses as $mail_to_address)
|
||||
|
@ -721,12 +722,26 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
|
|||
{
|
||||
$smtp->server_send("RCPT TO:$mail_to_address\r\n");
|
||||
if ($err_msg = $smtp->server_parse('250', __LINE__))
|
||||
{
|
||||
// We continue... if users are not resolved we do not care
|
||||
if ($smtp->numeric_response_code != 550)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$rcpt = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We try to send messages even if a few people do not seem to have valid email addresses, but if no one has, we have to exit here.
|
||||
if (!$rcpt)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Ok now we tell the server we are ready to start sending data
|
||||
$smtp->server_send("DATA\r\n");
|
||||
|
@ -1082,7 +1097,6 @@ class smtp_class
|
|||
{
|
||||
$tokens = array();
|
||||
}
|
||||
|
||||
$md5_challenge = $tokens;
|
||||
|
||||
if (!empty($md5_challenge))
|
||||
|
@ -1099,7 +1113,6 @@ class smtp_class
|
|||
|
||||
$auth_1 = sprintf('%s:%s:%s', pack('H32', md5(sprintf('%s:%s:%s', $username, $md5_challenge['realm'], $password))), $md5_challenge['nonce'], $cnonce);
|
||||
$auth_2 = 'AUTHENTICATE:' . $digest_uri;
|
||||
|
||||
$response_value = md5(sprintf('%s:%s:00000001:%s:auth:%s', md5($auth_1), $md5_challenge['nonce'], $cnonce, md5($auth_2)));
|
||||
|
||||
$input_string = sprintf('username="%s",realm="%s",nonce="%s",cnonce="%s",nc="00000001",qop=auth,digest-uri="%s",response=%s,%d', $username, $md5_challenge['realm'], $md5_challenge['nonce'], $cnonce, $digest_uri, $response_value, $md5_challenge['maxbuf']);
|
||||
|
|
Loading…
Add table
Reference in a new issue