From 3d8951bac5c9dd532a811248e9b9fc6401442373 Mon Sep 17 00:00:00 2001 From: CyberVitexus Date: Wed, 18 Oct 2023 03:38:11 +0200 Subject: [PATCH] EASE_FROM configuration recognised now by Mail class --- README.md | 1 + debian/composer.json | 2 +- src/Ease/Mailer.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26acc96..82cff5a 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ Framework Constants * EASE_LOGGER - one of memory,console,file,syslog,email,std,eventlog or combination eg. "console|syslog" * EASE_EMAILTO - recipient email address for Ease/Logger/ToMail * EASE_SMTP - Custom [SMTP Settings](https://pear.php.net/manual/en/package.mail.mail.factory.php) (JSON Encoded) + * EASE_FROM - Sent mail sender address * LOG_DIRECTORY - destination for ToFile logger * LOG_OPTION - syslog option argument * LOG_FACILITY - syslog facility argument diff --git a/debian/composer.json b/debian/composer.json index e33fc5d..065742f 100644 --- a/debian/composer.json +++ b/debian/composer.json @@ -1,7 +1,7 @@ { "name": "deb/ease-core", "description": "An Core of PHP Framework for Ease of writing Applications (debianized)", - "version": "1.39.0", + "version": "1.41.0", "authors": [ { "name": "Vítězslav Dvořák", diff --git a/src/Ease/Mailer.php b/src/Ease/Mailer.php index 2f4af1c..1146c4f 100644 --- a/src/Ease/Mailer.php +++ b/src/Ease/Mailer.php @@ -132,7 +132,7 @@ public function __construct(string $emailAddress, string $mailSubject, $emailCon $this->setMailHeaders( [ 'To' => $emailAddress, - 'From' => $this->fromEmailAddress, + 'From' => empty($this->fromEmailAddress) ? \Ease\Shared::cfg('EASE_FROM') : $this->fromEmailAddress, 'Reply-To' => $this->fromEmailAddress, 'Subject' => $mailSubject, 'Content-Type' => 'text/plain; charset=utf-8',