Jump to content

Recommended Posts

Posted

I think that styling html email is good and using cross client/browser compatible email (also responsive) is better.
 
Moreover add the necessary code html and css to make it through the WYSIWYG editor of Blesta, it is virtually impossible (if it is good, after saving you lose pieces).
 
I image, editing email templates in Blesta, that i can select for each template a "model", stored in company folder: so i can make transactional emails more attractive and effective.
 
I made some changes that work for us:
- we get and update an html email from https://github.com/mailgun/transactional-email-templates;
- we put one or more placeholders (eg, "@BODY@") in this template;
- we put this template in "uploads/[COMPANY_ID]/email_templates" folder and name (e.g. "tpl_email.htm");
- we added in app/models/emails.php after row #806 

$email->html = $parser->parseString($email->html, $parser_options_html)->render($tags);

the following

Loader::loadComponents($this, array("SettingsCollection"));
                $tmp = $this->SettingsCollection->fetchSetting(null, Configure::get("Blesta.company_id"), "uploads_dir");
                $template_path = $tmp['value'] . Configure::get("Blesta.company_id") . DS . "email_templates" . DS;
                if (file_exists($template_path . "tpl_email.htm")) {
                    $tpl = file_get_contents($template_path . "tpl_email.htm");
                    $email->html = str_replace('@BODY@', $email->html, $tpl);
}

Attached you can see one of results. But now i like to have a more friendly management of this feature.

 

What do you think about?

 

post-9466-0-03035100-1421709637_thumb.pn

  • 1 month later...
  • 6 years later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...