diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-02-18 06:22:53 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2019-02-18 06:22:53 +0000 |
commit | 51f30e54a8410672eea49817d68dfe2d38b16a21 (patch) | |
tree | 56804e8be4808584a5d22e4afdf72dc8c900105e /Postman/Postman-Mail/PostmanMessage.php | |
parent | 1d2f9717ac60dd25d97894391d6e5f14d0c9c13d (diff) | |
download | Post-SMTP-51f30e54a8410672eea49817d68dfe2d38b16a21.zip |
= 1.9.8 - 2019-02-18
* New: a new from field to the fallback - Can't trust the username as "from" value (email address).
Diffstat (limited to 'Postman/Postman-Mail/PostmanMessage.php')
-rw-r--r-- | Postman/Postman-Mail/PostmanMessage.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Postman/Postman-Mail/PostmanMessage.php b/Postman/Postman-Mail/PostmanMessage.php index a85687e..2af67ef 100644 --- a/Postman/Postman-Mail/PostmanMessage.php +++ b/Postman/Postman-Mail/PostmanMessage.php @@ -228,6 +228,13 @@ if ( ! class_exists( 'PostmanMessage' ) ) { $this->logger->debug( sprintf( 'Forced From email address: before=%s after=%s', $this->getFromAddress()->getEmail(), $forcedEmailAddress ) ); $this->getFromAddress()->setEmail( $forcedEmailAddress ); } + + if ( $options->is_fallback ) { + $fallback_email = $options->getFallbackFromEmail(); + $this->logger->debug( sprintf( 'Fallback: Forced From email address: before=%s after=%s', $this->getFromAddress()->getEmail(), $fallback_email ) ); + $this->getFromAddress()->setEmail( $fallback_email ); + } + $forcedEmailName = $options->getMessageSenderName(); if ( $options->isSenderNameOverridePrevented() && $this->getFromAddress()->getName() !== $forcedEmailName ) { $this->logger->debug( sprintf( 'Forced From email name: before=%s after=%s', $this->getFromAddress()->getName(), $forcedEmailName ) ); |