Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 31)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Modify the contents of email notification of new Private Message

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
3 years 11 months ago - 3 years 11 months ago #322889 by boyjahq
We are using the CB private message system and are trying to modify the content of the email that is sent to a user when they have received a private message.

We are modifying in language overrides the constant FROM_HAS_SENT_MESSAGE

We want to include things such as the recipient's name and username in the email, but it seems that substitutions do not work. For example, include [firstname] or [lastname] or [username] in the body of the email are not being replaced.

How can we modify the content of the FROM_HAS_SENT_MESSAGE email to use CB substitutions?

It also appears that these mails are in HTML format, which we cannot seem to control. But in other places in CB when we have the choice of plain text or HTML email it is suggested that HTML not be used to avoid mail as potentially marked as spam. Is there a reason that this particular mail message is HTML? The problem is that the text that is in EMAIL_NOTE_AUTOMATIC_GENERATION override, which is not HTML, does not render properly at the end of these email messages.
Last edit: 3 years 11 months ago by boyjahq.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
3 years 10 months ago #322896 by krileon
That email doesn't support substitutions at this time. You can only use the predefined [form] and [message] substitutions for that notification. Have added a feature ticket to review enabling substitutions for those emails.

forge.joomlapolis.com/issues/8356

It also appears that these mails are in HTML format, which we cannot seem to control. But in other places in CB when we have the choice of plain text or HTML email it is suggested that HTML not be used to avoid mail as potentially marked as spam. Is there a reason that this particular mail message is HTML? The problem is that the text that is in EMAIL_NOTE_AUTOMATIC_GENERATION override, which is not HTML, does not render properly at the end of these email messages.

HTML only emails are fine and will become the default behavior for all future emails. What about EMAIL_NOTE_AUTOMATIC_GENERATION isn't rendering properly?


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.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
3 years 10 months ago #322905 by boyjahq

HTML only emails are fine and will become the default behavior for all future emails. What about EMAIL_NOTE_AUTOMATIC_GENERATION isn't rendering properly?


It loses all line returns.

For all of our other plain text emails, it renders like this:

WWOOFジャパン
***************************************************
www.wwoofjapan.com
心も体もオーガニック。WWOOFを通して実りある生活を
ホストとウーファーは「家族のような友達同士」です
***************************************************
● WWOOFの本 書店・オンライン書店で発売中 ●
「旅とオーガニックと幸せと
 WWOOF農家とウーファーたち」
Facebook :http://www.facebook.com/WWOOFinJapan
Instagram :https://www.instagram.com/wwoofjapan/
***************************************************
注意: この電子メールは配信専用です。このアドレスへご返信くださってもWWOOF ジャパンでは受信できません。お問合せの場合は「返信」ボタンを押さず、WWOOF ジャパンお問合せフォームからご連絡をお願いします。


But in this particular New Private Message notification email, it looks like this:

WWOOFジャパン *************************************************** www.wwoofjapan.com 心も体もオーガニック。WWOOFを通して実りある生活を ホストとウーファーは「家族のような友達同士」です *************************************************** ● WWOOFの本 書店・オンライン書店で発売中 ● 「旅とオーガニックと幸せと  WWOOF農家とウーファーたち」 Facebook :http://www.facebook.com/WWOOFinJapan Instagram :https://www.instagram.com/wwoofjapan/ *************************************************** 注意: この電子メールは配信専用です。このアドレスへご返信くださってもWWOOF ジャパンでは受信できません。お問合せの場合は「返信」ボタンを押さず、WWOOF ジャパンお問合せフォームからご連絡をお願いします。

I have tried adding \r\n to the EMAIL_NOTE_AUTOMATIC_GENERATION text where line returns should be, but it does not change anything.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48630
  • Thanks: 8307
  • Karma: 1446
3 years 10 months ago #322907 by krileon
That's due to the below bug that we don't have a solution for yet.

forge.joomlapolis.com/issues/5434

PHPMailer is supposed to be converting linebreaks to HTML, but for some reason it doesn't for some emails. We're not sure what the cause is. The easiest solution is to always use HTML emails and change the \r\n in EMAIL_NOTE_AUTOMATIC_GENERATION to <br /> tags. This will ensure HTML is always used and be consistent. Will be enforcing this change in a later release.


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