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. include("../class/system/class.phpmailer.php")
  12.  
  13. $mail new phpmailer();
  14.  
  15. if(defined('MAIL_USE_SSL'&& MAIL_USE_SSL== true{
  16.     $mail->Host MAIL_HOST_SSL;
  17.     $mail->Port MAIL_PORT_SSL;
  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. if (defined('MAIL_SMTP_AUTH'&& MAIL_SMTP_AUTH == true{
  30.     $mail->SMTPAuth MAIL_SMTP_AUTH;
  31.     if (defined('MAIL_SMTP_USER')) $mail->Username MAIL_SMTP_USER;
  32.     if (defined('MAIL_SMTP_PASS')) $mail->Password MAIL_SMTP_PASS;
  33. }
  34.  
  35. /**
  36. echo "destinataire : ".$email_dest."<br />";
  37. echo "sujet : ".$email_subject."<br />";
  38. echo "body : ".$email_html_body."<br />";
  39. echo "methode : ".$email_method."<br />";
  40. echo "host : ".$mail->Host."<br />";
  41. echo "port : ".$mail->Port."<br />";
  42. */
  43.  
  44. $mail->CharSet CHARSET;
  45. $mail->From MAIL_FROM;
  46. $mail->FromName MAIL_FROMNAME;
  47. $mail->AddAddress($email_dest);
  48. $mail->Subject $email_subject;
  49. $mail->WordWrap 75;
  50. $mail->Body $email_html_body;
  51. $mail->AltBody $email_text_body
  52. $mail->AddReplyTo(MAIL_REPLYMAIL_REPLYNAME);
  53.  
  54. $sending_result (!$mail->Send()) 1;
  55.  
  56. $mail->ClearAddresses();
  57. $mail->ClearAttachments();
  58.  
  59. ?>

Documentation generated on Sat, 08 Nov 2008 14:54:41 +0100 by phpDocumentor 1.4.1