Commit f743dfc8 authored by Elias Villiger's avatar Elias Villiger
Browse files

F6706 - Add cc and bcc to MailLog - Refs #6706, closes #6706

parent 8203e8f7
Pipeline #964 passed with stage
in 1 minute and 50 seconds
......@@ -128,6 +128,10 @@ $UPDATE_ARRAY = array(
"ALTER TABLE `Form` ADD `primaryKey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `tableName`",
],
'18.10.1' => [
"ALTER TABLE `MailLog` ADD `cc` TEXT NOT NULL AFTER `receiver`, ADD `bcc` TEXT NOT NULL AFTER `cc`;",
],
);
......
......@@ -272,6 +272,8 @@ class SendMail {
// Log
$log[] = $mailConfig[SENDMAIL_TOKEN_RECEIVER];
$log[] = $mailConfig[SENDMAIL_TOKEN_RECEIVER_CC];
$log[] = $mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC] ?? '';
$log[] = $mailConfig[SENDMAIL_TOKEN_SENDER];
$log[] = $mailConfig[SENDMAIL_TOKEN_SUBJECT];
$log[] = $mailConfig[SENDMAIL_TOKEN_BODY];
......@@ -284,7 +286,7 @@ class SendMail {
$log[] = empty($mailConfig[SENDMAIL_TOKEN_SRC]) ? 0 : $mailConfig[SENDMAIL_TOKEN_SRC];
$db = new Database();
$db->sql('INSERT INTO MailLog (`receiver`, `sender`, `subject`, `body`, `header`, `attach`, `grId`, `xId`, `xId2`, `xId3`, `src`, `modified`, `created`) VALUES ( ?, ? , ? , ? ,?, ?, ? ,?, ?, ?, ?, NOW(), NOW() )', ROW_REGULAR, $log);
$db->sql('INSERT INTO MailLog (`receiver`, `cc`, `bcc`, `sender`, `subject`, `body`, `header`, `attach`, `grId`, `xId`, `xId2`, `xId3`, `src`, `modified`, `created`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW() )', ROW_REGULAR, $log);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment