user700048
user700048

Reputation: 119

html email with link opened with html email off

I would like to send an html email with a link but want it to look ok if html is off in the recipients email client how can I do this:

With HTML: Available Here

With Out HTML: Available at https://stackoverflow.com/

Upvotes: 0

Views: 146

Answers (2)

VladFr
VladFr

Reputation: 835

You should ensure that your text is readable without css or html formatting (i.e. if you're using tables, make sure the order of the text is ok if you strip the tags, if you use images, use alts)

Use a library such as SwiftMailer that will let you add multipart content to an email. It's much easier than setting the headers yourself.

Upvotes: 1

onteria_
onteria_

Reputation: 70577

Then use multipart alternative to send a text version alternative to your HTML email that has the full link.

Upvotes: 2

Related Questions