diff --git a/e107_handlers/mail.php b/e107_handlers/mail.php index d0eef62ac..16dbc0e11 100644 --- a/e107_handlers/mail.php +++ b/e107_handlers/mail.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/mail.php,v $ -| $Revision: 1.5 $ -| $Date: 2007-04-14 10:39:55 $ +| $Revision: 1.6 $ +| $Date: 2007-04-14 19:38:10 $ | $Author: e107coders $ +----------------------------------------------------------------------------+ */ @@ -42,6 +42,17 @@ php 4.3.6 does NOT have this problem. function sendemail($send_to, $subject, $message, $to_name, $send_from, $from_name, $attachments='', $Cc='', $Bcc='', $returnpath='', $returnreceipt='',$inline ="") { global $pref,$mailheader_e107id,$tp; + // ----- Mail pref. template override for parked domains, site mirrors or dynamic values + global $EMAIL_METHOD, $EMAIL_SMTP_SERVER, $EMAIL_SMTP_USER, $EMAIL_SMTP_PASS, $EMAIL_SENDMAIL_PATH, $EMAIL_FROM, $EMAIL_FROM_NAME; + if($EMAIL_METHOD){ $pref['mailer'] = $EMAIL_METHOD; } + if($EMAIL_SMTP_SERVER){ $pref['smtp_server'] = $EMAIL_SMTP_SERVER; } + if($EMAIL_SMTP_USER){ $pref['smtp_username'] = $EMAIL_SMTP_USER; } + if($EMAIL_SMTP_PASS){ $pref['smtp_password'] = $EMAIL_SMTP_PASS; } + if($EMAIL_SENDMAIL_PATH){ $pref['sendmail'] = $EMAIL_SENDMAIL_PATH; } + if($EMAIL_FROM){ $pref['siteadminemail'] = $EMAIL_FROM; } + if($EMAIL_FROM_NAME){ $pref['siteadmin'] = $EMAIL_FROM_NAME; } + // ------------------------------------------------------------------------- + require_once(e_HANDLER."phpmailer/class.phpmailer.php"); $mail = new PHPMailer(); @@ -196,4 +207,4 @@ function validatemail($Email) { -?> \ No newline at end of file +?> diff --git a/e107_themes/templates/email_template.php b/e107_themes/templates/email_template.php index 2863aab60..00177a6df 100644 --- a/e107_themes/templates/email_template.php +++ b/e107_themes/templates/email_template.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_themes/templates/email_template.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:36:12 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-04-14 19:38:10 $ +| $Author: e107coders $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -28,6 +28,16 @@ $SIGNUPEMAIL_BCC = ""; // comma separated email addresses to put in BCC of the $SIGNUPEMAIL_ATTACHMENTS = ""; // files-path array of attachments. eg. array(e_FILE."myfile.zip",e_FILE."myotherfile.zip"); $SIGNUPEMAIL_BACKGROUNDIMAGE = "";// relative path to a background image eg. e_IMAGE."mybackground.jpg"; +// Optional admin preferences Override. +$EMAIL_METHOD = ""; // php, smtp or sendmail +$EMAIL_SMTP_SERVER = ""; // smtp.myserver.com +$EMAIL_SMTP_USER = ""; +$EMAIL_SMTP_PASS = ""; +$EMAIL_SENDMAIL_PATH = ""; +$EMAIL_FROM = ""; // admin@mysite.com +$EMAIL_FROM_NAME = ""; // Admin + + $EMAIL_HEADER = " @@ -76,4 +86,9 @@ LAN_403." {SITENAME}
"; -?> \ No newline at end of file + + + + + +?>