merge -c3798 from trunk to branch 2.0

Bug 1145: Mails are sent in double


git-svn-id: http://piwigo.org/svn/branches/2.0@3799 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub
2009-08-26 20:17:28 +00:00
parent 128632c8e9
commit 13872e6e92
2 changed files with 3 additions and 4 deletions
+1
View File
@@ -132,6 +132,7 @@ class smtp_mail
$this->server_write('MAIL FROM:<'.$this->email_webmaster.'>'."\r\n");
$this->server_parse('250');
// Add "To:" on headers if there are included
if ((preg_match('/^\s*to\s*:.*/mi', $headers) === 0) and !empty($to))
{
$to_header = 'To:'.implode(',', array_map(create_function('$email','return "<".$email.">";'), explode(',', $to)));
+2 -4
View File
@@ -608,12 +608,10 @@ function pwg_mail($to, $args = array())
$headers.= 'Reply-To: '.$args['from']."\n";
if (empty($to))
{
// Add only when to is empty
// else mail() add 'To:' on header
$headers.= 'To: undisclosed-recipients: ;'."\n";
}
else
{
$headers.= 'To: '.$to."\n";
}
if (!empty($args['Cc']))
{