• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jul 20, 2012 Jul 20, 2012

Copy link to clipboard

Copied

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!

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 20, 2012 Jul 20, 2012

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 20, 2012 Jul 20, 2012

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation