Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I send mail with both plain text as well as HTML text so that each mail reader can choose the format appropriate for it?

0
Posted

How do I send mail with both plain text as well as HTML text so that each mail reader can choose the format appropriate for it?

0

multipart/alternative message. You construct such a message essentially the same way you construct a multipart/mixed message, using a MimeMultipart object constructed using new MimeMultipart(“alternative”). You then insert the text/plain body part as the first part in the multpart and insert the text/html body part as the second part in the multipart. You’ll need to construct the plain and html parts yourself to have appropriate content. See RFC2046 for details of the structure of such a message.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123