Commit 0af33392 authored by Carsten  Rose's avatar Carsten Rose
Browse files

B6562: sendmail: redirect all mail - the sender is replaced too.

parent 9fd33232
Pipeline #785 passed with stage
in 1 minute and 47 seconds
...@@ -69,6 +69,7 @@ class SendMail { ...@@ -69,6 +69,7 @@ class SendMail {
$addBody .= 'TO: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER] . PHP_EOL; $addBody .= 'TO: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER] . PHP_EOL;
$addBody .= 'CC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] . PHP_EOL; $addBody .= 'CC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] . PHP_EOL;
$addBody .= 'BCC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC] . PHP_EOL; $addBody .= 'BCC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC] . PHP_EOL;
$addBody .= 'SENDER: ' . $mailConfig[SENDMAIL_TOKEN_SENDER] . PHP_EOL;
$addBody .= PHP_EOL . "==========================================" . PHP_EOL . PHP_EOL; $addBody .= PHP_EOL . "==========================================" . PHP_EOL . PHP_EOL;
// Check if the given body is a HTML body. // Check if the given body is a HTML body.
...@@ -81,6 +82,7 @@ class SendMail { ...@@ -81,6 +82,7 @@ class SendMail {
$mailConfig[SENDMAIL_TOKEN_RECEIVER] = $redirectAllMail; $mailConfig[SENDMAIL_TOKEN_RECEIVER] = $redirectAllMail;
$mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] = ''; $mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] = '';
$mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC] = ''; $mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC] = '';
$mailConfig[SENDMAIL_TOKEN_SENDER] = $redirectAllMail;
} }
$mailConfig = $this->setDefault($mailConfig); $mailConfig = $this->setDefault($mailConfig);
...@@ -123,6 +125,9 @@ class SendMail { ...@@ -123,6 +125,9 @@ class SendMail {
* @throws DownloadException * @throws DownloadException
* @throws UserFormException * @throws UserFormException
* @throws UserReportException * @throws UserReportException
* @throws \PhpOffice\PhpSpreadsheet\Exception
* @throws \PhpOffice\PhpSpreadsheet\Reader\Exception
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
*/ */
private function sendEmail(array $mailConfig) { private function sendEmail(array $mailConfig) {
$args = array(); $args = array();
......
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