Mailer.php
authorAlan Knowles <alan@roojs.com>
Wed, 16 Dec 2015 07:26:21 +0000 (15:26 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 16 Dec 2015 07:26:21 +0000 (15:26 +0800)
Mailer.php

index 4d2dc92..e217552 100644 (file)
@@ -297,7 +297,7 @@ class Pman_Core_Mailer {
             $ret['recipents'] =  $this->rcpts;
         }
         
-        if (empty($ret['headers']['To']) || !strlen(trim($ret['headers']['To']))) {
+        if (!empty($ret['recipents']) && (empty($ret['headers']['To']) || !strlen(trim($ret['headers']['To'])))) {
             $ret['headers']['To'] = implode(',', $ret['recipents']);
         }