mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +02:00
Added support for parked domains, site mirrors or dynamic mail preferences using email template.
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/mail.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/mail.php,v $
|
||||||
| $Revision: 1.5 $
|
| $Revision: 1.6 $
|
||||||
| $Date: 2007-04-14 10:39:55 $
|
| $Date: 2007-04-14 19:38:10 $
|
||||||
| $Author: e107coders $
|
| $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 ="") {
|
function sendemail($send_to, $subject, $message, $to_name, $send_from, $from_name, $attachments='', $Cc='', $Bcc='', $returnpath='', $returnreceipt='',$inline ="") {
|
||||||
global $pref,$mailheader_e107id,$tp;
|
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");
|
require_once(e_HANDLER."phpmailer/class.phpmailer.php");
|
||||||
|
|
||||||
$mail = new PHPMailer();
|
$mail = new PHPMailer();
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/email_template.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_themes/templates/email_template.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:36:12 $
|
| $Date: 2007-04-14 19:38:10 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
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_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";
|
$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 = "
|
$EMAIL_HEADER = "
|
||||||
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
|
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">
|
||||||
@@ -76,4 +86,9 @@ LAN_403." {SITENAME}<br />
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
Reference in New Issue
Block a user