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.class | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 1f39013..d28423d 100644 --- a/it.class +++ b/it.class @@ -772,17 +772,19 @@ static function map($expression, $array) } /** - * Send a mail. Expects array for Header => Content pairs with Body => for the mail body. + * Send a mail. + * @param $p Header => Content pairs with Body => for the mail body + * @param $p['forcemail'] Send this mail even if we're on a twin or devel machine * @return nothing useful */ static function mail($p) { - $body = $p['Body']; - unset($p['Body']); - $mail = new it_mail($p); - $mail->add_body($body); + $headers = $p; + unset($headers['forcemail'], $headers['Body']); + $mail = new it_mail($headers); + $mail->add_body($p['Body']); - return $mail->send(); + return $mail->send($p); } /** -- cgit v1.2.3