[svn r17919] Minor - Logic change - Added a new configuration by default into mail.conf.dist.php about charset and it's used now into api_mail function - see FS#2445

skala
Cristian Fasanando 16 years ago
parent b6b966ddc5
commit 3f37281154
  1. 1
      main/inc/conf/mail.conf.dist.php
  2. 3
      main/inc/lib/mail.lib.inc.php

@ -11,6 +11,7 @@ $platform_email['SMTP_MAILER'] = 'mail'; //mail, sendmail or smtp
$platform_email['SMTP_AUTH'] = 0;
$platform_email['SMTP_USER'] = '';
$platform_email['SMTP_PASS'] = '';
$platform_email['SMTP_CHARSET'] = $charset;
// ====================================================================

@ -1,6 +1,6 @@
<?php //$id: $
require(api_get_path(INCLUDE_PATH).'lib/phpmailer/class.phpmailer.php');
require_once(api_get_path(INCLUDE_PATH).'/conf/mail.conf.php');
require_once(api_get_path(INCLUDE_PATH).'/conf/mail.conf.dist.php');
//regular expression to test for valid email address
// this should actually be revised to use the complete RFC3696 description
@ -30,6 +30,7 @@ function api_mail($recipient_name, $recipient_email, $subject, $message, $sender
$mail->Mailer = $platform_email['SMTP_MAILER'];
$mail->Host = $platform_email['SMTP_HOST'];
$mail->Port = $platform_email['SMTP_PORT'];
$mail->CharSet = $platform_email['SMTP_CHARSET'];
$mail->WordWrap = 200; // stay far below SMTP protocol 980 chars limit
if($platform_email['SMTP_AUTH'])

Loading…
Cancel
Save