Fix Email class ignoring DB from-address settings

Constructor now reads cybermail_from_email and cybermail_from_name from
the settings table via getSetting(), falling back to constants. Matches
the pattern already used for cybermail_api_key and the global sendEmail()
wrapper in functions.php. Admin integrations page changes now take effect
across all email paths.
This commit is contained in:
2026-06-03 03:44:10 +00:00
parent f8e9746340
commit a5b91ca0ea
+2 -2
View File
@@ -12,8 +12,8 @@ class Email {
public function __construct() { public function __construct() {
$this->apiKey = getSetting('cybermail_api_key', defined('CYBERMAIL_API_KEY') ? CYBERMAIL_API_KEY : ''); $this->apiKey = getSetting('cybermail_api_key', defined('CYBERMAIL_API_KEY') ? CYBERMAIL_API_KEY : '');
$this->fromEmail = defined('SENDER_EMAIL') ? SENDER_EMAIL : 'noreply@tomsjavajive.com'; $this->fromEmail = getSetting('cybermail_from_email', defined('SENDER_EMAIL') ? SENDER_EMAIL : 'noreply@tomsjavajive.com');
$this->fromName = defined('SENDER_NAME') ? SENDER_NAME : "Tom's Java Jive"; $this->fromName = getSetting('cybermail_from_name', defined('SENDER_NAME') ? SENDER_NAME : "Tom's Java Jive");
} }
private function logEmail(string $to, string $subject, string $html, array $result, array $options = []): void { private function logEmail(string $to, string $subject, string $html, array $result, array $options = []): void {