diff --git a/modules/notifications/batch/process_email_stack.php b/modules/notifications/batch/process_email_stack.php
index d5190ef305217620f959990320821af2f416d306..d509de0ac70d834e843063c57a8b30a80546e0e0 100755
--- a/modules/notifications/batch/process_email_stack.php
+++ b/modules/notifications/batch/process_email_stack.php
@@ -61,17 +61,19 @@ while ($state <> 'END') {
             $email->html_body = str_replace("\'", "'", $email->html_body);
             $email->html_body = str_replace("''", "'", $email->html_body);
 
-            if (empty($email->sender) && !empty((string)$mailerParams->mailfrom)) {
-                $email->sender = (string)$mailerParams->mailfrom;
-            }
+            if (((string)$mailerParams->type) == 'smtp') {
+                if (empty($email->sender) && !empty((string)$mailerParams->mailfrom)) {
+                    $email->sender = (string)$mailerParams->mailfrom;
+                }
 
-            if (substr($email->sender, 0, 1) != '<') {
-                $email->sender = '<' . $email->sender;
-            }
-            if (substr($email->sender, -1) != '>') {
-                $email->sender .= '>';
+                if (substr($email->sender, 0, 1) != '<') {
+                    $email->sender = '<' . $email->sender;
+                }
+                if (substr($email->sender, -1) != '>') {
+                    $email->sender .= '>';
+                }
             }
-            
+
             if ($email->sender <> '<>') {
                 $GLOBALS['mailer']->setReturnPath($email->sender);
                 $GLOBALS['mailer']->setFrom($email->sender);