-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b35c30
commit 0fb8fb2
Showing
8 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
$email['smtpUsername'] = $row["smtp_username"]; | ||
$email['smtpPassword'] = $row["smtp_password"]; | ||
$email['fromEmail'] = $row["from_email"] ? $row["from_email"] : "[email protected]"; | ||
$email['otherEmail'] = $row["other_email"]; | ||
} | ||
|
||
// Check if Discord notifications are enabled and get the settings | ||
|
@@ -216,6 +217,13 @@ | |
$mail->setFrom($email['fromEmail'], 'Wallos App'); | ||
$mail->addAddress($emailaddress, $name); | ||
|
||
if (!empty($email['otherEmail'])) { | ||
$list = explode(';', $email['otherEmail']); | ||
foreach($list as $value) { | ||
$mail->addCC(trim($value)); | ||
} | ||
} | ||
|
||
$mail->Subject = 'Wallos Cancellation Notification'; | ||
$mail->Body = $message; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ | |
$email['smtpUsername'] = $row["smtp_username"]; | ||
$email['smtpPassword'] = $row["smtp_password"]; | ||
$email['fromEmail'] = $row["from_email"] ? $row["from_email"] : "[email protected]"; | ||
$email['otherEmail'] = $row["other_email"]; | ||
} | ||
|
||
// Check if Discord notifications are enabled and get the settings | ||
|
@@ -260,6 +261,13 @@ | |
$mail->setFrom($email['fromEmail'], 'Wallos App'); | ||
$mail->addAddress($emailaddress, $name); | ||
|
||
if (!empty($email['otherEmail'])) { | ||
$list = explode(';', $email['otherEmail']); | ||
foreach($list as $value) { | ||
$mail->addCC(trim($value)); | ||
} | ||
} | ||
|
||
$mail->Subject = 'Wallos Notification'; | ||
$mail->Body = $message; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
// This migration adds a "other_email" column to the email_notifications table. | ||
|
||
/** @noinspection PhpUndefinedVariableInspection */ | ||
$columnQuery = $db->query("SELECT * FROM pragma_table_info('email_notifications') where name='other_email'"); | ||
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false; | ||
|
||
if ($columnRequired) { | ||
$db->exec('ALTER TABLE email_notifications ADD COLUMN other_email TEXT DEFAULT "";'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters