linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file template.php

Documentation is available at template.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage mail
  5.  * @author linea21 <info@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. // necessary for loops
  12. if(!in_array(SITE_PATH.'/class/system/class.phpmailer.php'get_included_files()))
  13. include_once("../class/system/class.phpmailer.php");
  14.  
  15. $mail new phpmailer();
  16.  
  17. if(defined('MAIL_PORT')) $mail->Port MAIL_PORT;
  18.  
  19. if (defined('MAIL_MAILER')) {
  20.   $mail->Mailer MAIL_MAILER;
  21.   if(MAIL_MAILER=='sendmail'{
  22.     if(defined('MAIL_SENDMAIL')) $mail->Sendmail MAIL_SENDMAIL;
  23.   }
  24.   if(MAIL_MAILER=='smtp'{
  25.     if(defined('MAIL_HOST')) $mail->Host MAIL_HOST;
  26.     
  27.   }
  28. }
  29.  
  30. if (defined('MAIL_SMTP_AUTH'&& MAIL_SMTP_AUTH == true{
  31.   $mail->SMTPAuth MAIL_SMTP_AUTH;
  32.   if (defined('MAIL_SMTP_USER')) $mail->Username MAIL_SMTP_USER;
  33.   if (defined('MAIL_SMTP_PASS')) $mail->Password MAIL_SMTP_PASS;
  34. }
  35.  
  36. /**
  37.  echo "destinataire : ".$email_dest."<br />";
  38.  echo "sujet : ".$email_subject."<br />";
  39.  echo "body : ".$email_html_body."<br />";
  40.  echo "methode : ".$email_method."<br />";
  41.  echo "host : ".$mail->Host."<br />";
  42.  echo "port : ".$mail->Port."<br />";
  43.  */
  44. $mail->SetLanguage('en');
  45. $mail->CharSet CHARSET;
  46. isset($email_from$mail->From $email_from $mail->From MAIL_FROM;
  47. isset($email_fromname$mail->FromName $email_fromname $mail->FromName MAIL_FROMNAME;
  48. $mail->AddAddress($email_dest);
  49. $mail->Subject $email_subject;
  50. $mail->WordWrap 75;
  51. $mail->Body $email_html_body;
  52. $mail->AltBody str_replace('&amp;''&'$email_text_body);
  53. $mail->AddReplyTo(MAIL_REPLYMAIL_REPLYNAME);
  54.  
  55. $r $mail->Send();
  56. logfile(LOG_MAILERarray($mail->Subject$email_dest$mail->ErrorInfo));
  57. if(!$r && MOD_DEBUG == 1{
  58.   _debug('<b>Mail has not been sent</b>. mail->ErrorInfo : ' $mail->ErrorInfo);
  59.  
  60. }
  61.  
  62. $mail->ClearAddresses();
  63. $mail->ClearAttachments();
  64. ?>

Documentation generated on Thu, 03 May 2012 15:07:48 +0200 by phpDocumentor 1.4.1