Reputation: 6499
I've already seen this post but it doesn't seem to be the method I need.
What I'm doing at the moment is creating an email as a .html file then attaching it in Outlook and sending - What I want to do is send an email over Outlook that has HTML/CSS styling but also has a plain text version as a fallback.
I've been searching and searching and all i'm getting is info about MIME (Multi-Purpose Internet Mail Extensions) and that's about as far as I got :/
Is there something I can simply add to the code of my html file that determines whether to use HTML or plain text?
Upvotes: 2
Views: 10914
Reputation: 101
You need have a multi part email with 2 parts. The first is a text/plain and the second is the text/html. The first part has the body be the email with no formatting. It needs to be first because the parts are suppose to go from worst to best.
Upvotes: 10
Reputation: 43479
It's not HTML text that needs to be changed, but it's headers sent along email.
I don't know how are you sending email from HTML, but all you have to do is to set header to Content-Type: text/plain;"
instead of Content-Type: text/html;"
. Then your email content will be sent as plain text without any parsing.
Upvotes: -1