aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_mail.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2009-08-26 20:14:57 +0000
committerrub <rub@piwigo.org>2009-08-26 20:14:57 +0000
commit3c3c084156d0be2588278abb2cd383ece1c42c73 (patch)
tree4544cb669e2f83ff7c7142202a26a13bc813c1bc /include/functions_mail.inc.php
parent21510eb4c6a8c4a527fcfc7b9de84072d70a81df (diff)
Bug 1145: Mails are sent in double
git-svn-id: http://piwigo.org/svn/trunk@3798 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_mail.inc.php')
-rw-r--r--include/functions_mail.inc.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/functions_mail.inc.php b/include/functions_mail.inc.php
index 68d8dd37c..e38ef44b6 100644
--- a/include/functions_mail.inc.php
+++ b/include/functions_mail.inc.php
@@ -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']))
{