Skip to Content Skip to Menu

Email Beautifier

7 years 1 month ago #297538 by fedorvaneldijk
Email Beautifier was created by fedorvaneldijk
Hi,

Do you happen to know if the Email Beautifier from Techjoomla is working with CB user registration? Kunena works fine but the CB emails are not templated at all.

...or maybe my question should be: is there any way - or extension - to template outgoing CB emails?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 1 month ago #297542 by krileon
Replied by krileon on topic Email Beautifier
CB uses its own email API and emails are not passed through Joomla content prepare. So if it's acting on Joomla mailer API or is a content plugin then it won't work with CB emails. You can probably try and force modification of the emails using CB Auto Actions, but it's not a simple usecase so you'd need to be familiar with CB Auto Actions to set it up. The trigger you'd use is onBeforeSendMail which is fired when a CB mailer is constructed. It's variables are as follows.

Code:
$_PLUGINS->trigger( 'onBeforeSendMail', array( &$mail, &$from, &$fromname, &$recipient, &$subject, &$body, &$mode, &$cc, &$bcc, &$attachment, &$replyto, &$replytoname, &$properties, &$error ) );

You would probably need to use a Code action and set Variable 6 to be used by reference (Parameters tab) so it can be modified by your Code action. Example as follows.

Global
Triggers: onBeforeSendMail
Type: Code
User: User
Access: Everybody
Action
Method: PHP
Code:
Code:
$variables['var7'] = \CBLib\Application\Application::Cms()->prepareHtmlContentPlugins( $variables['var7'], 'autoaction', '[user_id]' );

Note the above is untested and likely needs adjustments. It ideally would pass the email body through Joomla content prepare.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 1 month ago #297549 by fedorvaneldijk
Replied by fedorvaneldijk on topic Email Beautifier
Ok.. clear... and what is the prefered CB way to template emails?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 1 month ago #297550 by krileon
Replied by krileon on topic Email Beautifier
Modifying the language string and adding your HTML, etc.. directly to it. You can use language overrides shown below to do this.

www.joomlapolis.com/blog/kyle/18701-language-overrides-have-arrived


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

7 years 1 month ago #297557 by fedorvaneldijk
Replied by fedorvaneldijk on topic Email Beautifier
Great - that works well. A central maintained template would be more convenient but this sure is a nice solution.

One more step: I can not find an override for mass mail... isn't there one? Is there another way to template these?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
7 years 1 month ago #297571 by krileon
Replied by krileon on topic Email Beautifier

One more step: I can not find an override for mass mail... isn't there one? Is there another way to template these?

There's no templates for mass mailer. It does support language strings so I suppose you could create a language string like EMAIL_TMPL_MASSMAIL then translate that language key in language overrides and use it as the email body.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum