more debug information for notification failure

This commit is contained in:
Klaus Leithoff 2008-12-09 14:02:15 +00:00
parent 80c3da850d
commit a6d7f0caf3

View File

@ -101,10 +101,10 @@ class notifications_email implements notifications_iface {
if(is_array($_attachments) && count($_attachments) > 0) { if(is_array($_attachments) && count($_attachments) > 0) {
foreach($_attachments as $attachment) { foreach($_attachments as $attachment) {
$this->mail->AddStringAttachment($attachment->string, $attachment->filename, $attachment->encoding, $attachment->type); $this->mail->AddStringAttachment($attachment->string, $attachment->filename, $attachment->encoding, $attachment->type);
} }
} }
if(!$error=$this->mail->Send()) { if(!$error=$this->mail->Send()) {
throw new Exception("Failed sending notification message via email.$error"); throw new Exception("Failed sending notification message via email.$error".print_r($this->mail->ErrorInfo,true));
} }
} }