• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 406
  • Last Modified:

Sending TEXT and HTML e-mail messages

I'm using PEAR:Mail and PEAR:Mail_Mime to send e-mails in both text and html versions, expecting the mail client (Outlook 2003) to display the right format -- depending on how the client is set up.  

I'm confused about how that's supposed to work.  

I set my Outlook 2003 to display all incoming e-mails in plain text and then I sent an e-mail to myself using my PHP script.  Instead of receiving the 'text-only' e-mail, as I expected, I received the HTML version of the e-mail with all of the HTML tags simply stripped out.  With my e-mail client set to receive only plain-text e-mails, should the text-only version of the e-mail have appeared instead of the stripped-down HTML version?  

I guess I don't understand, in which circumstances, the text-only version would appear when sending a multipart e-mail message.

  • 3
2 Solutions
You are correct in your understanding of how multipart MIME emails are supposed to work.  So, apparently something is wrong in the implementation or your Outlook setup.

Have you tried setting Outlook to display in HTML to verify that it still displays the HTML version?
marcparilloAuthor Commented:
Yes, I've successfully switched from HTML to Plain Text, but I never see the "Text" e-mail that was sent -- only the HTML version with the tags stripped out.  The only way I know to switch between text and html in Outlook is:  Tools -> Options -> Preferences -> E-Mail Options -> Check "Read all standard mail in plain text"

I don't see any other way to force Outlook to show text instead of HTML, so I think I'm doing it correctly.
I think you are doing it correctly. I assume you've tested with a different mail client, configured to view text messages and that works ok? If so, you've proven that your implementation is correct.

Outlook, like most mail clients, won't automatically "switch" between text and HTML with multipart MIME. I believe the idea is that unless you specify you want text messages, it will display the HTML component.
marcparilloAuthor Commented:
So, a good test would be to see if the text version of the e-mail shows up in a client such as Alpine?  If the text-only message doesn't appear in Alpine, then I'm doing something wrong, right?  Is there a better text-only client to work with?
marcparilloAuthor Commented:
Thank you for your input!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now