Search code examples
mime-typeshtml-email

Declaring mime type for html-email


I want to create a html email and I've read a lot about how to do it. There is one piece of information I can't find. How should I declare the mime type? I tried with:

meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

but it doesn't work.

Later edit:
I am trying to set the content-type of the mail to text/html but I don't know how. All this when writing from a regular email client. I have to declare it in the mail body? Or in the mail header (if so, how do I o it?)?


Solution

  • Are you trying to set the content-type declaration within the message header sent to the mail server? If so, you should set it this way, in a line itself:

    Content-Type: text/html; charset=UTF-8