summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2011-11-22 16:39:06 +0000
committerUrban Müller2011-11-22 16:39:06 +0000
commit6f0cd1a4a442f9c27dd07f0e956f5253f378465d (patch)
tree2abc47b5d3024da58d908744cb3dad275eb67c4b /it.class
parent326f0dad5c9bebe408595a453d92194cd4eb932e (diff)
downloaditools-6f0cd1a4a442f9c27dd07f0e956f5253f378465d.tar.gz
itools-6f0cd1a4a442f9c27dd07f0e956f5253f378465d.tar.bz2
itools-6f0cd1a4a442f9c27dd07f0e956f5253f378465d.zip
support sending of mails on twin/devel
Diffstat (limited to 'it.class')
-rw-r--r--it.class14
1 files changed, 8 insertions, 6 deletions
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);
}
/**