###END_AUTOCODE
/**
*
+ * Build an email to sent do user
+ *
+ * key 'args'
+ *
+ * no_auth => disable authentication check on
+ * templateDir => alternative template directory.
+ * HTTP_HOST
+ *
+ * expects mail/TMPLATE.txt (if .html exists, it will be the html body version)
+ *
* @param {String} $templateFile (mail/XXXXXXX.txt) exclude the mail and .txt bit.
* @param {Array|Object} $args data to send out..
* @return {Array|PEAR_Error} array of $recipents, $header, $body
}
$headers['Date'] = date('r');
-
if ($htmlbody !== false) {
+ require_once 'Mail/mime.php';
$mime = new Mail_mime(array('eol' => "\n"));
- $mime->setHeaders($headers);
$mime->setTXTBody($body);
$mime->setHTMLBody($htmlbody);
// I think there might be code in mediaoutreach toEmail somewhere
// h embeds images here..
$body = $mime->get();
- $hdrs = $mime->headers($hdrs);
+ $headers = $mime->headers($headers);
}
-
-
-
+
return array(
'recipients' => $recipents,