diff --git a/e107_admin/cache.php b/e107_admin/cache.php
index 6e91f6b48..3e98adf17 100644
--- a/e107_admin/cache.php
+++ b/e107_admin/cache.php
@@ -45,7 +45,8 @@ if (e107::getPref('cachestatus') == '2')
if(!is_writable(e_CACHE_CONTENT))
{
- e107::getRender()->tablerender(CACLAN_3, CACLAN_10."
(".$CACHE_DIRECTORY.")");
+ $mes->addError(CACLAN_10." (".e_CACHE.")");
+ e107::getRender()->tablerender(CACLAN_3, $mes->render());
require_once("footer.php");
exit;
}
diff --git a/e107_admin/prefs.php b/e107_admin/prefs.php
index 4104486ae..f6cc076de 100644
--- a/e107_admin/prefs.php
+++ b/e107_admin/prefs.php
@@ -217,13 +217,33 @@ function sendTest()
else
{
$mailheader_e107id = USERID;
- require_once(e_HANDLER.'mail.php');
+ // require_once(e_HANDLER.'mail.php');
$add = ($pref['mailer']) ? " (".strtoupper($pref['mailer']).")" : ' (PHP)';
$sendto = trim($_POST['testaddress']);
- if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, str_replace("[br]", "\n", LAN_MAILOUT_114),LAN_MAILOUT_189))
+
+
+ $eml = array();
+
+ $eml['email_subject'] = LAN_MAILOUT_113." ".SITENAME.$add;
+ $eml['email_sender_email'] = null;
+ $eml['email_sender_name'] = null;
+ $eml['email_replyto'] = null;
+ $eml['email_replytonames'] = null;
+ $eml['send_html'] = true;
+ $eml['add_html_header'] = null;
+ $eml['email_body'] = str_replace("[br]", "
", LAN_MAILOUT_114);
+ $eml['email_attach'] = null;
+ $eml['template'] = 'default';
+ $eml['e107_header'] = USERID;
+
+ if (!e107::getEmail()->sendEmail($sendto, LAN_MAILOUT_189, $eml))
{
$mes->addError(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106);
}
+ // if (!sendemail($sendto, LAN_MAILOUT_113." ".SITENAME.$add, str_replace("[br]", "\n", LAN_MAILOUT_114),LAN_MAILOUT_189))
+ // {
+ // $mes->addError(($pref['mailer'] == 'smtp') ? LAN_MAILOUT_67 : LAN_MAILOUT_106);
+ // }
else
{
$mes->addSuccess(LAN_MAILOUT_81. ' ('.$sendto.')');
diff --git a/e107_core/templates/email_template.php b/e107_core/templates/email_template.php
index 6be78599d..e6397da8b 100644
--- a/e107_core/templates/email_template.php
+++ b/e107_core/templates/email_template.php
@@ -2,25 +2,14 @@
/*
* e107 website system
*
- * Copyright (C) 2008-2013 e107 Inc (e107.org)
+ * Copyright (C) 2008-2014 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Templates for all emails
*
- * $URL: $
- * $Revision: 11315 $
- * $Id: $
*/
-/**
- *
- * @package e107
- * @subpackage e107_templates
- * @version $Id: mail_manager_class.php 11315 2010-02-10 18:18:01Z secretr $;
- *
-*/
-
/**
* This file defines the default templates for each type of email which may be sent.
@@ -318,13 +307,7 @@ $MONTHLYUPDATE_TEMPLATE = array(
);
-/*
- * QUICK ADD USER EMAIL TEMPLATE - BODY.
- * This is the email that is sent when an admin creates a user account in admin. "Quick Add User"
- USRLAN_185 = A user account has been created for you at {SITEURL} with the following login:
Login Name: {LOGIN}
Password: {PASSWORD}
- USRLAN_186 = Please go to the site as soon as possible and log in, then change your password using the \'Settings\' option.
- You can also change other settings at the same time.
Note that your password cannot be recovered if you lose it.
-*/
+
$QUICKADDUSER_TEMPLATE = array(
'template_name' => 'Quick-Add-User',
@@ -334,7 +317,102 @@ $QUICKADDUSER_TEMPLATE = array(
'email_body' => USRLAN_185.USRLAN_186,
// 'email_footer' => 'footer'
);
-
+
+
+
+
+
+/** Standardized v2 template rewrite
+ * Format for individual emails sent by e107 (not bulk emails for now) - a work in progress - bulk could be ported later.
+ * @see e107Email::sendEmail();
+ * Aim: to make email templates follow the same spec. as other templates while remaining as intuitive as other v2 templates in e107.
+ */
+
+
+// Default - test email and when no template specified.
+
+$EMAIL_TEMPLATE['default']['name'] = 'Default';
+$EMAIL_TEMPLATE['default']['header'] = "
+
+