mirror of
https://github.com/myronblair/tomsjavajive
synced 2026-06-30 17:50:32 -05:00
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:
+2
-2
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user