summaryrefslogtreecommitdiff
path: root/it_mail.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_mail.class')
-rw-r--r--it_mail.class8
1 files changed, 6 insertions, 2 deletions
diff --git a/it_mail.class b/it_mail.class
index 33105a3..81a282f 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -179,7 +179,7 @@ function add_file($filename, $mimetype = "application/octet-stream", $name = '')
/**
* Send this email message
- * @return True if mail was sent
+ * @return True if mail was accepted for delivery
*/
function send()
{
@@ -287,7 +287,11 @@ function send()
}
if (it::is_live() || EDC('forcemail'))
- return mail($to, $this->header_escape($this->subject), $text, join("\n", $headers), $this->flags);
+ {
+ if (($result = mail($to, $this->header_escape($this->subject), $text, join("\n", $headers), $this->flags)) === false)
+ it::error(array('title' => 'failed sending mail', 'body' => D($to, $this->header_escape($this->subject), $text, $headers, $this->flags)));
+ return $result;
+ }
else
return ED($to, $this->header_escape($this->subject), $text, $headers, $this->flags);
}