Source for file template.php
Documentation is available at template.php
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
include_once("../class/system/class.phpmailer.php");
if(defined('MAIL_PORT')) $mail->Port = MAIL_PORT;
$mail->Mailer = MAIL_MAILER;
if(MAIL_MAILER== 'sendmail') {
if(defined('MAIL_SENDMAIL')) $mail->Sendmail = MAIL_SENDMAIL;
if(MAIL_MAILER== 'smtp') {
if(defined('MAIL_HOST')) $mail->Host = MAIL_HOST;
if (defined('MAIL_SMTP_AUTH') && MAIL_SMTP_AUTH == true) {
$mail->SMTPAuth = MAIL_SMTP_AUTH;
if (defined('MAIL_SMTP_USER')) $mail->Username = MAIL_SMTP_USER;
if (defined('MAIL_SMTP_PASS')) $mail->Password = MAIL_SMTP_PASS;
echo "destinataire : ".$email_dest."<br />";
echo "sujet : ".$email_subject."<br />";
echo "body : ".$email_html_body."<br />";
echo "methode : ".$email_method."<br />";
echo "host : ".$mail->Host."<br />";
echo "port : ".$mail->Port."<br />";
$mail->SetLanguage('en');
$mail->CharSet = CHARSET;
isset ($email_from) ? $mail->From = $email_from : $mail->From = MAIL_FROM;
isset ($email_fromname) ? $mail->FromName = $email_fromname : $mail->FromName = MAIL_FROMNAME;
$mail->AddAddress($email_dest);
$mail->Subject = $email_subject;
$mail->Body = $email_html_body;
$mail->AltBody = str_replace('&', '&', $email_text_body);
$mail->AddReplyTo(MAIL_REPLY, MAIL_REPLYNAME);
logfile(LOG_MAILER, array($mail->Subject, $email_dest, $mail->ErrorInfo));
if(!$r && MOD_DEBUG == 1) {
_debug('<b>Mail has not been sent</b>. mail->ErrorInfo : ' . $mail->ErrorInfo);
$mail->ClearAttachments();
|