Move reading secret constants into files that need them to prevent crashes when scripts are run by users without permissions to read secrets

This commit is contained in:
Alex Cabal 2022-03-23 13:06:28 -05:00
parent fe93a1184b
commit 0bf50873ac
2 changed files with 7 additions and 2 deletions

View file

@ -2,6 +2,9 @@
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
define('EMAIL_SMTP_USERNAME', trim(file_get_contents(POSTMARK_SECRET_FILE_PATH)) ?: '');
const EMAIL_SMTP_PASSWORD = EMAIL_SMTP_USERNAME;
class Email{
public $To = '';
public $From = '';