Froxlor icon indicating copy to clipboard operation
Froxlor copied to clipboard

HTML Mails broken

Open torcolato opened this issue 6 years ago • 2 comments

When setting up a HTML email template (i.e. new new_database_by_customer) the mail being send is broken.

System information

  • Froxlor version: 0.9.39.5
  • Web server: apache2
  • SMTP server: postfix
  • OS/Version: Ubuntu 18.04

Steps to reproduce

  1. fill in HTML code on the admin_templates.php page
  2. let froxlor send mail
  3. view raw mail in MUA
  4. see that all newlines have been converted to '<br/>' which breaks the design of the mails

Expected behavior

  1. no conversion to <br/> of newlines so that HMTL mails get displayed correctly

Actual behavior

  1. line 257 of customer_mysql.php does the str_replace. $mail->MsgHTML(str_replace("\n", "<br />", $mail_body));

I would love to be able so send out html mails! Thanks!

torcolato avatar Aug 16 '18 20:08 torcolato

Well this is intended, you are not allowed to enter HTML code due to security. If froxlor will enable HTML usage in templates could be something for the feature, possibly by using some richtext-editor or similar

d00p avatar Aug 17 '18 05:08 d00p

@torcolato Workaround: Remove all newlines from your HTML email template. Works fine for me.

heavygale avatar Oct 02 '19 12:10 heavygale