From e07720a39130ab4a862f4d9d0a06f8f7f0c705e7 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Tue, 5 Mar 2013 14:39:04 -0400 Subject: [PATCH] BUG 10940 Email issue SOLVED - We are not using reply to attribute - Now we are using reply to attribute --- workflow/engine/classes/class.spool.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/workflow/engine/classes/class.spool.php b/workflow/engine/classes/class.spool.php index 82bc6009d..babe1320a 100755 --- a/workflow/engine/classes/class.spool.php +++ b/workflow/engine/classes/class.spool.php @@ -273,6 +273,22 @@ class spoolRun $this->fileData['from_name'] = ''; $this->fileData['from_email'] = $matches[0]; } + + // Set reply to + preg_match( $this->longMailEreg, $this->fileData['from_name'], $matches ); + if (isset($matches[3])) { + $this->fileData['reply_to'] = $matches[3]; + $this->fileData['reply_to_name'] = isset($matches[1]) ? $matches[1] : $this->fileData['from_name']; + } else { + preg_match( $this->mailEreg, $this->fileData['from_name'], $matches ); + if (isset($matches[1])) { + $this->fileData['reply_to'] = $matches[1]; + $this->fileData['reply_to_name'] = ''; + } else { + $this->fileData['reply_to'] = ''; + $this->fileData['reply_to_name'] = ''; + } + } } @@ -405,6 +421,11 @@ class spoolRun $oPHPMailer->Password = $this->config['MESS_PASSWORD']; $oPHPMailer->From = $this->fileData['from_email']; $oPHPMailer->FromName = utf8_decode( $this->fileData['from_name'] ); + if (isset($this->fileData['reply_to'])) { + if ($this->fileData['reply_to'] != '') { + $oPHPMailer->AddReplyTo($this->fileData['reply_to'], $this->fileData['reply_to_name']); + } + } $msSubject = $this->fileData['subject'];