Page 1 of 1
XHTML Mime-based Emails
Posted: Sun Dec 14, 2003 12:19 am
by Gen-ik
Probably shouldn't be in the PHP area but hey-ho.
I've just finished coding my own email class{} and was wondering if it's wise to send emails in the XHTML format.
Outlook Express seems to handle it ok, has anyone tried it with any other email progs?
Posted: Sun Dec 14, 2003 4:38 am
by volka
which content-type do you set?
good ol' text/html or appliation/xhtml+xml ?
Re: XHTML Mime-based Emails
Posted: Sun Dec 14, 2003 10:23 am
by Fredix
Gen-ik wrote: and was wondering if it's wise to send emails in the XHTML format.
Only if you are absolutely sure that there is absolutely no way doing without HTML stuff in your mails. It think that there most users would be grateful if they receive emails that are not HTML formatted (or at least I would be). If you use HTML you should offer both possibilities (text and HTML emails)
Posted: Sun Dec 14, 2003 11:16 am
by Gen-ik
volka wrote:which content-type do you set?
good ol' text/html or appliation/xhtml+xml ?
Not too sure what you mean.
The basic XHTML template I use for the emails is this..
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title> ї:subject:] </title>
<style type="text/css"> ї:style:] </style>
</head>
<body>
ї:message:]
</body>
</html>
The actual mime-content-type depends on wether or not the email contains any images and/or attachments. It could be multipart/alternative, multipart/mixed, or multipart/related.
If the email is mime-based then there are two parts to it.... text/plain and text/html.
Re: XHTML Mime-based Emails
Posted: Sun Dec 14, 2003 11:19 am
by Gen-ik
Fredix wrote:Gen-ik wrote: and was wondering if it's wise to send emails in the XHTML format.
Only if you are absolutely sure that there is absolutely no way doing without HTML stuff in your mails. It think that there most users would be grateful if they receive emails that are not HTML formatted (or at least I would be). If you use HTML you should offer both possibilities (text and HTML emails)
The type of email sent depends on which Email Format the user has selected.. either HTML or Plain-text.