diff options
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 ) ); |