Index: trunk/kernel/include/emailmessage.php =================================================================== diff -u -N -r1128 -r1221 --- trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 1128) +++ trunk/kernel/include/emailmessage.php (.../emailmessage.php) (revision 1221) @@ -269,12 +269,17 @@ $this->recipient = $objUsers->GetUser($this->Get("FromUserId")); $this->recipient->TagPrefix="touser"; - if($this->recipient->Get("PortalUserId")==$this->Get("FromUserId")) - { + + if($this->recipient->Get("PortalUserId")==$this->Get("FromUserId") || strlen($this->recipient->Get("PortalUserId")) == 0) + { $to_addr = $this->recipient->Get("Email"); $To = trim($this->recipient->Get("FirstName")." ".$this->recipient->Get("LastName")); $this->ReadTemplate(); - + + if (strlen($to_addr) == 0) { + $to_addr = $objConfig->Get("Smtp_AdminMailFrom"); + } + $subject = $this->ParseSection($this->subject); $body = $this->ParseSection($this->body); $FromName = "System Event";