summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail
diff options
context:
space:
mode:
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 );