From 6f0cd1a4a442f9c27dd07f0e956f5253f378465d Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 22 Nov 2011 16:39:06 +0000 Subject: support sending of mails on twin/devel --- it_mail.class | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'it_mail.class') diff --git a/it_mail.class b/it_mail.class index dafd704..81c9a67 100644 --- a/it_mail.class +++ b/it_mail.class @@ -179,9 +179,10 @@ function add_file($filename, $mimetype = "application/octet-stream", $name = '') /** * Send this email message + * @param $p['forcemail'] Send mail even if on twin or devel machine * @return True if mail was accepted for delivery */ -function send() +function send($p = array()) { $to = join(",", $this->to); $headers = array(); @@ -286,7 +287,7 @@ function send() $text .= "--$boundary1--\n"; } - if (it::is_live() || EDC('forcemail')) + if (it::is_live() || EDC('forcemail') || $p['forcemail']) { if (($result = mail($to, $this->header_escape($this->subject), $text, join("\n", $headers), $this->flags)) === false) it::error(array('title' => "failed sending mail to $to subject $this->subject", 'body' => D($text, $headers, $this->flags))); -- cgit v1.2.3