1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 13:21:54 +02:00

Issue #4919 - Add support for quick custom email template without separate file.

This commit is contained in:
camer0n
2023-10-27 11:03:46 -07:00
parent 552af19c54
commit c419d402d7
2 changed files with 46 additions and 2 deletions

View File

@@ -913,9 +913,16 @@ class e107Email extends PHPMailer
{
require_once(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_users.php"); // do not use e107::lan etc.
if(is_array($eml['template']) && !empty($eml['template']['plugin']) && !empty($eml['template']['name']) && !empty($eml['template']['key']))
if(is_array($eml['template']))
{
$tmpl = e107::getTemplate($eml['template']['plugin'],$eml['template']['name'], $eml['template']['key']);
if(!empty($eml['template']['plugin']) && !empty($eml['template']['name']) && !empty($eml['template']['key'])) // Plugin template
{
$tmpl = e107::getTemplate($eml['template']['plugin'],$eml['template']['name'], $eml['template']['key']);
}
elseif(isset($eml['template']['header']) && isset($eml['template']['body']) && isset($eml['template']['footer'])) // Custom Template
{
$tmpl = $eml['template'];
}
}
else
{