summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-29 08:12:44 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-07-29 08:12:44 +0000
commit5a5695ede73662b36dacb0e531c72100af3c0d58 (patch)
tree646347ab3b3a761d651f8583a4dcad750c86ee51
parent37135861d72243401087a3c9d6924a54ca9f3678 (diff)
- Include all recipients in sendmail log
git-svn-id: https://svn.roundcube.net/trunk@3838 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/program/steps/mail/func.inc8
2 files changed, 9 insertions, 0 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index aab214b3f..c454b6d4b 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Include all recipients in sendmail log
- Support HTTP_X_FORWARDED_PROTO header for HTTPS detecting (#1486866)
- Fix default IMAP port configuration (#1486864)
- Create Sent folder when starting to compose a new message (#1486802)
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index 9d6d96dfb..a1cc68d16 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -1444,6 +1444,14 @@ function rcmail_deliver_message(&$message, $from, $mailto, &$smtp_error, &$body_
// remove MDN headers after sending
unset($headers['Return-Receipt-To'], $headers['Disposition-Notification-To']);
+ // get all recipients
+ if ($headers['Cc'])
+ $mailto .= $headers['Cc'];
+ if ($headers['Bcc'])
+ $mailto .= $headers['Bcc'];
+ if (preg_match_all('/<([^@]+@[^>]+)>/', $mailto, $m))
+ $mailto = implode(', ', array_unique($m[1]));
+
if ($CONFIG['smtp_log']) {
write_log('sendmail', sprintf("User %s [%s]; Message for %s; %s",
$RCMAIL->user->get_username(),