summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-28 07:40:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-08-28 07:40:35 +0000
commit13f4177df858577e8fc8b8695d385f3bdee05221 (patch)
treecb9536382ed3c2de7df3ef95cac9e9df8e94ee34 /roundcubemail/program/steps/mail/func.inc
parent799aab70a2411c59806c323026736a57a753927c (diff)
- Write to log also sent MDN confirmation messages
git-svn-id: https://svn.roundcube.net/trunk@1686 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
-rw-r--r--roundcubemail/program/steps/mail/func.inc15
1 files changed, 13 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc
index f578090f6..b1f359f63 100644
--- a/roundcubemail/program/steps/mail/func.inc
+++ b/roundcubemail/program/steps/mail/func.inc
@@ -1076,7 +1076,7 @@ function rcmail_deliver_message(&$message, $from, $mailto)
$msg_body = $message->get();
$headers = $message->headers();
-
+
// send thru SMTP server using custom SMTP library
if ($CONFIG['smtp_server'])
{
@@ -1122,8 +1122,19 @@ function rcmail_deliver_message(&$message, $from, $mailto)
$sent = mail($headers_enc['To'], $headers_enc['Subject'], $msg_body, $header_str, "-f$from");
}
- if ($sent) // remove MDN headers after sending
+ if ($sent)
+ {
+ // remove MDN headers after sending
unset($headers['Return-Receipt-To'], $headers['Disposition-Notification-To']);
+
+ if ($CONFIG['smtp_log'])
+ write_log('sendmail', sprintf("[%s] User: %d on %s; Message for %s; %s",
+ date("d-M-Y H:i:s O", mktime()),
+ $_SESSION['user_id'],
+ $_SERVER['REMOTE_ADDR'],
+ $mailto,
+ !empty($smtp_response) ? join('; ', $smtp_response) : ''));
+ }
$message->_headers = array();
$message->headers($headers);