Mass Mailer breaks complicated emails

1 year 2 months ago - 1 year 2 months ago #332909 by kdave321
Mass Mailer breaks complicated emails was created by kdave321
I have an elaborate HTML-formatted email that I was sending to users from User Mgmt -> Mass Mailer
It was working great as of Nov 22nd last year but a recent upgrade now inserts dozens of spurious line-break codes ( <br> ) which ruins the layout of the email.
The result page after sending shows "Email Message" is still correct (not yet altered), so I don't know where the line-breaks are being inserted.
It doesn't matter what editor I use for the textarea. It is happening even with no editor. I haven't changed what sends the email - I think it's still PHP Mailer.

Please Log in to join the conversation.

1 year 2 months ago #332911 by krileon
Replied by krileon on topic Mass Mailer breaks complicated emails
My guess is the HTML you're suppling has non-HTML linebreaks. We convert non-HTML linebreaks to HTML linebreaks during HTML emails now to fix issues with linebreaks not working as one would expect. Adjust the contents of your email to either not have non-HTML linebreaks or convert them to HTML linebreaks yourself where intended and remove the rest.


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 to join the conversation.

1 year 2 months ago - 1 year 2 months ago #332913 by kdave321
Replied by kdave321 on topic Mass Mailer breaks complicated emails
Oh, great. That rather defeats the purpose of a wysiwig HTML editor. How do I turn that off?  (Which PHP script is doing that and I will hack it myself)
Of course I have line-feeds at the end of every line - the HTML would be unmaintainable otherwise.
But it's worse than that - the conversion goes crazy on some tags. I attach the original Q.html and the messed up email that it sent, result.html
Note after the div tag that it adds 18 <br>'s!
 
Attachments:

Please Log in to join the conversation.

1 year 2 months ago #332914 by krileon
Replied by krileon on topic Mass Mailer breaks complicated emails
It can't be turned off. Removing it would require modifying core code, which you will lose those changes every time you update CB. Below is where this is done.

IN: libraries/CBLib/CB/Legacy/LegacyComprofilerFunctions.php
ON: Line 349

I understand this is frustrating for you, but to understand why it was done is because 99% of our email configurations are just textarea fields and people tend to not add br tags for a linebreak and instead just do a text linebreak so we convert these for them. This helps the vast majority of our users, but does cause problems in cases like yours.

Will review adding an option to skip this when using mass mailer as that's our only WYSYWIG email or to skip it globally.

forge.joomlapolis.com/issues/9128


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 to join the conversation.

1 year 2 months ago #332915 by kdave321
Replied by kdave321 on topic Mass Mailer breaks complicated emails
It makes sense if you're converting a text email to HTML but not if it's already HTML. Isn't there a setting for emails in HTML?

Please Log in to join the conversation.

1 year 2 months ago #332917 by krileon
Replied by krileon on topic Mass Mailer breaks complicated emails
As explained above most of our email parameters are textarea fields. They are not WYSIWYG fields. Users expect their linebreaks in the textarea fields to persists. They will not unless we convert them for them. We've only I believe 2 WYSIWYG emails (mass mailer and cbsubs mailer). A feature to toggle this off at the API level is being reviewed for a future release so those emails will skip doing this behavior.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.227 seconds

Facebook Twitter LinkedIn