Allow to configure CC mailing

This commit is contained in:
Tobias Herre 2021-11-03 12:33:55 +01:00
parent 6ad54e1a3a
commit 5fe39a1cbf
2 changed files with 10 additions and 6 deletions

View File

@ -9,5 +9,6 @@ $mailPassword = 'mailpasswd'; // SMTP password
$mailSMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
$mailDest = "someone@example.com";
$mailDestCC = "someone_cc@example.com"; // leave empty if no CC is required
$mailFrom = "someone@example.com";

View File

@ -416,6 +416,9 @@ if ($_POST['sendmail']=='yes'){
$mail->Subject = $subj;
$mail->Body = "Kostenerstattungsantrag ...";
$mail->AddAddress($mailDest);
if ($mailDestCC) {
$mail->AddCC($mailDestCC);
}
$mail->AddAttachment( $file , 'antrag.pdf' );
$mail->Host = $mailHost; // Specify main and backup server