Add hard-coded recipients

This commit is contained in:
Kumi 2020-09-03 11:55:25 +02:00
parent 92ce2092e7
commit e925f79b8f
2 changed files with 8 additions and 0 deletions

View file

@ -10,6 +10,10 @@ $MAIL_PORT = null; // Default: 587 (no encryption/STARTTLS), 465 (SMTPS)
$MAIL_FROM_MAIL = "noreply@expmail.example"; // Leave blank to use $MAIL_USER
$MAIL_FROM_NAME = "EXPMail";
$ALWAYS_TO = []; // List of email addresses that will always be added as "To:"
$ALWAYS_CC = []; // List of email addresses that will always be added as "CC:"
$ALWAYS_BCC = []; // List of email addresses that will always be added as "BCC:"
$API_KEYS = [
"verysecretstring"
];

View file

@ -42,6 +42,10 @@ try {
foreach ($json["ccs"] as $cc) $mailer->addCC($cc["email"], $cc["name"]);
foreach ($json["bccs"] as $bcc) $mailer->addBCC($bcc["email"], $bcc["name"]);
foreach ($ALWAYS_TO as $recipient) $mailer->addAddress($recipient);
foreach ($ALWAYS_CC as $cc) $mailer->addCC($cc);
foreach ($ALWAYS_BCC as $bcc) $mailer->addBCC($bcc);
$mailer->isHTML((bool) $html);
$mailer->Subject = $json["subject"];
$mailer->Body = ($html ? $html : $text);