Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a plain text fallback with HTML email

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?

like image 500
SaturnsEye Avatar asked Jun 08 '26 17:06

SaturnsEye


1 Answers

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.

like image 139
JGordon Avatar answered Jun 11 '26 11:06

JGordon