Added an option to send a copy of all generated e-mails to a BCC address
This commit is contained in:
parent
4d1205a0fe
commit
ac224fa178
|
|
@ -36,6 +36,10 @@ class Mail extends Base implements ClientInterface
|
|||
->setFrom($this->helper->mail->getMailSenderAddress(), $authorName)
|
||||
->setTo(array($recipientEmail => $recipientName));
|
||||
|
||||
if (! empty(MAIL_BCC)) {
|
||||
$message->setBcc(MAIL_BCC);
|
||||
}
|
||||
|
||||
$headers = $message->getHeaders();
|
||||
|
||||
// See https://tools.ietf.org/html/rfc3834#section-5
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ defined('REMEMBER_ME_AUTH') or define('REMEMBER_ME_AUTH', getenv('REMEMBER_ME_AU
|
|||
// Mail configuration
|
||||
defined('MAIL_CONFIGURATION') or define('MAIL_CONFIGURATION', getenv('MAIL_CONFIGURATION') ? strtolower(getenv('MAIL_CONFIGURATION')) === 'true' : true);
|
||||
defined('MAIL_FROM') or define('MAIL_FROM', getenv('MAIL_FROM') ?: 'notifications@kanboard.local');
|
||||
defined('MAIL_BCC') or define('MAIL_BCC', getenv('MAIL_BCC') ?: '');
|
||||
defined('MAIL_TRANSPORT') or define('MAIL_TRANSPORT', getenv('MAIL_TRANSPORT') ?: 'mail');
|
||||
defined('MAIL_SMTP_HOSTNAME') or define('MAIL_SMTP_HOSTNAME', getenv('MAIL_SMTP_HOSTNAME') ?: '');
|
||||
defined('MAIL_SMTP_PORT') or define('MAIL_SMTP_PORT', intval(getenv('MAIL_SMTP_PORT')) ?: 25);
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ define('MAIL_CONFIGURATION', true);
|
|||
// E-mail address used for the "From" header (notifications)
|
||||
define('MAIL_FROM', 'replace-me@kanboard.local');
|
||||
|
||||
// E-mail address used for the "Bcc" header to send a copy of all notifications
|
||||
define('MAIL_BCC', '');
|
||||
|
||||
// Mail transport available: "smtp", "sendmail", "mail" (PHP mail function), "postmark", "mailgun", "sendgrid"
|
||||
define('MAIL_TRANSPORT', 'mail');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue