ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Forgot Password email message formatting

January 12, 2012 5:00pm

Subscribe [1]
  • #1 / Jan 12, 2012 5:00pm

    Marc Miller

    84 posts

    This question may be related to a resolved thread.

    The original question in the above thread wasn’t finalized and it’s the same one I’m having.

    1) Admin -> Email Configuration has HTML set as Default Mail Format
    2) PHP Mail is set

    I used the email_test.php script and the formatting is retained in the test email generated from that. But the password recovery email the formatting is stripped and is a jumbled mess - as described in that original post.

    EE 2.3.1

  • #2 / Jan 14, 2012 12:42pm

    Dan Decker

    7338 posts

    Hi Marc Miller,

    I’m sorry this is happening to you as well. Thanks for already running the email_test.php script, that let’s us know that there is something going on in ExpressionEngine. Can you tell me if the formatting is stripped away if you set Plain Text as the default format?

    Thanks!

  • #3 / Jan 16, 2012 12:42pm

    Marc Miller

    84 posts

    Thanks Dan.
    Well, I did some more tests. Registration emails are losing it’s line breaks and HTML, too. Gmail will auto convert the registration link into a URL for me, but Thunderbird will not (which will be really annoying for new users to copy/paste that link)

    I sent out some emails in the Communicate tab. Lines do not break when the Email Formatting is set as HTML, but the Text Formatting is none. When I change the Text Formatting to XHTML, then the line breaks are back in! Progress!

    Now, how do I force XHTML onto the default email templates? Might there be a config file setting I’m missing that does that?

  • #4 / Jan 16, 2012 12:59pm

    Marc Miller

    84 posts

    I added the these two settings to my config file, but with no affect on the line breaks.

    http://ellislab.com/expressionengine/user-guide/general/hidden_configuration_variables.html#email-crlf

  • #5 / Jan 16, 2012 5:03pm

    Marc Miller

    84 posts

    Ah, I guess I don’t need it to be HTML email - I just want the line breaks.

    If I wrap actual HTML paragraph tags in my templates, then that is retained. I was under the impression that line breaks were converted automatically. At first (mistakenly) to HTML, but later just wondering why the Plain Text wasn’t displaying line breaks correctly.

    If you know of a way to get XHTML formatting applied to plain text system messages like the Communicate emails, then great! If that can’t be done, then I’ll just add HTML code to my templates and you can consider this closed.

  • #6 / Jan 23, 2012 5:13pm

    Dan Decker

    7338 posts

    Hey Marc,

    I apologize for leaving you hanging on this one.

    If you know of a way to get XHTML formatting applied to plain text system messages like the Communicate emails, then great!

    It is my understanding that plain text should still honor the line breaks, just that any other html formatting would be ignored, so links wouldn’t automatically be clickable, for example.

    ...I’ll just add HTML code to my templates…

    I’ve had great success with this. However, if you set the system default to HTML in Admin-> Email Configuration, that should be all that is required. The setting in the Communicate interface is only for that, it has no effect on the overall system, but the setting in Admin-> Email Configuration should be honored throughout.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases