summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-11-25 09:25:43 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-11-25 09:25:43 +0000
commitb5fd728e37aa2a9c7a5f37e8dead0a95117d541b (patch)
treea7158edc5e4e576e0377f078dabc87c699315c62 /Postman/Postman-Mail
parentc61784411988d36d9bbd93cd3a97e773990af342 (diff)
downloadPost-SMTP-b5fd728e37aa2a9c7a5f37e8dead0a95117d541b.zip
phpmailer delivery improvments
bug fixes add option to disable notifications fix Invalid “Reply-To” e-mail address
Diffstat (limited to 'Postman/Postman-Mail')
-rw-r--r--Postman/Postman-Mail/PostmanMessage.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/Postman/Postman-Mail/PostmanMessage.php b/Postman/Postman-Mail/PostmanMessage.php
index 12099ba..4099a02 100644
--- a/Postman/Postman-Mail/PostmanMessage.php
+++ b/Postman/Postman-Mail/PostmanMessage.php
@@ -450,7 +450,13 @@ if ( ! class_exists( 'PostmanMessage' ) ) {
break;
case 'reply-to' :
$this->logProcessHeader( 'Reply-To', $name, $content );
- $this->setReplyTo( $content );
+ $pattern = '/[a-z0-9_\-\+\.]+@[a-z0-9\-]+\.([a-z]{2,4})(?:\.[a-z]{2})?/i';
+ preg_match_all($pattern, $content, $matches);
+
+ if ( isset( $matches[0] ) && is_email( $matches[0] ) ) {
+ $this->setReplyTo( $content );
+ }
+
break;
case 'sender' :
$this->logProcessHeader( 'Sender', $name, $content );