Skip to main content
Known Participant
July 20, 2012
Question

How to send a plain text and HTML email at once?

  • July 20, 2012
  • 2 replies
  • 1342 views

Hi all,

I'm attempting to use cfmailpart to send a HTML and plain text email all in the same cfmail script.  I'm using Outlook and Gmail to test.  I temporarily changed my Outlook settings to "read all standard mail in plain text," but it does not read the plain text cfmailpart of the email, it just attempts to format the text from the HTML email and display the links.  If I remove the HTML cfmailpart from my cfmail script, the plain text version is delivered, but Outlook removes extra line breaks that I actually want to keep intact, and some of the other formatting is improperly rendered.  Is there a better way to make sure email clients hold the plain text formatting (even though there really isn't any formatting with plain text) and a better way to test?  The HTML version looks great in both Gmail and Outlook.

Thanks!

    This topic has been closed for replies.

    2 replies

    Inspiring
    July 20, 2012

    As far as Outlook removing extra line breaks, I think that's beyond your control.  If you really want to preserve white space in the plain text email, separate your line breaks with periods.

    BKBK
    Community Expert
    Community Expert
    July 20, 2012

    Use the wraptext attribute of the cfmailpart tag to add line breaks.