HTML email

J

Jeff Thies

There are rules for the boundary. Stil to alphanumerics and you'll be OK.
One rule of course is that the boundary should not appear in the real data
anywhere!

See the MIME RFCs for more details. IIRC OTTOMH it's RFC 2045 et al.

Correct as usual.

How do you do that?!

Cheers,
Jeff
 
D

David Dorward

Is there a browser out there that doesn't use styles (except for body
styles) that are in a stylesheet after the body tag?

Who cares about browsers? This is _email_. And <style> elements do get
stripped by some systems. Imagine a webmail system - <style> can only be
applied universally, so if <style> was not stripped an email could trash an
entire page.
 
A

Andy Dingley

Which mail clients don't support HTML email directly?

Who cares ? IMHE, HTML email is for Outlook.

Axiom 1: You _must_ give a good non-HTML equivalent to the email.

Axiom 2: Your boss, or whoever is requesting this HTML garbage in the
first place, is clueless enough that they just don;t understand the
problem, or all of the issues involved. If you can demonstrate "HTML
email" once, for once client (Outlook), then as far as they're
concerned, it's working.


For any other non-Outlook, potentially HTML capable email client, then
just let it fall back to the text-only version. After all, you've made
sure that works and is reliable, haven't you.


BTW - Just make sure you don't confuse "readable in Outlook" with
"generated by Outlook". We know how broken Outlook's email is.
 
T

Toby Inkster

Jeff said:
Correct as usual.
How do you do that?!

I once had a stab at writing a web forum that interfaced with mailing
lists and news groups. I was in *way* over my head -- the project was huge
and I ended up giving up. The side effect though is that I now know
most of the important bits of RFC822, SMTP, NNTP, MIME and POP3 off the
top of my head.

FWIW, the bits that I *did* end up writing were:

- A CGI script to take a MIME-formatted message body from a database
and display it as a web page, but that only supported (so far)
text/plain, text/html and multipart/alternative Content-Types;

- A pop3 fetcher that dumped the contents of a POP3 account to
stdout; and

- A script to process the output of the pop3 fetcher (and other
fetchers as they were written) and plop them into a database.

Don't think I still have any of the code though.
 
S

Sam Hughes

Who cares ? IMHE, HTML email is for Outlook.

Axiom 1: You _must_ give a good non-HTML equivalent to the email.

Let's not start using "axioms" as ends in themselves, ok?
 
W

William Park

Jeff Thies said:
It seems like I have to write an HTML formatted email (and I'm a
plain text guy!). So apart from the politics of this, what needs to go
in an HTML email?

It appears to me that if the html, body and head tags are optional for a
web page they probably aren't needed in HTML email either. Page titles
would certainly be useless!

So, I'm thinking.

A content-type, doctype and a stylesheet and then html, nothing else...
Or is there a reason to have all that extra baggage?

You can put any HTML file you like in the email body. Just put correct
header that the recipient expects. So, the simplest would be single
part email message, like
MIME-Version: 1.0
Content-type: text/html

<html>
...
</html>
Your recipient might consider every email body as HTML, in which case,
even the header declaration is optional.
 
N

Neal

Who cares about browsers? This is _email_. And <style> elements do get
stripped by some systems. Imagine a webmail system - <style> can only be
applied universally, so if <style> was not stripped an email could trash
an
entire page.

More evidence that CSS must be an optional part of HTML. One should create
HTML email with the same goal as HTML web documents: it works with just
the HTML and no pictures, style or scripts.
 
T

Toby Inkster

William said:
Your recipient might consider every email body as HTML, in which case,
even the header declaration is optional.

Huh? No, it's not. If there are no MIME-Version and Content-Type headers,
the message will be interpreted as text/plain;charset=us-ascii.
 
W

William Park

Toby Inkster said:
Huh? No, it's not. If there are no MIME-Version and Content-Type headers,
the message will be interpreted as text/plain;charset=us-ascii.

That's the responsibility of recipient. They can do anything with the
email body they like. They can check the header, or they can blindly
assume it's PDF and call up Acroread. As far as mail delivery of HTML
file, it's done.
 
T

Toby Inkster

William said:
That's the responsibility of recipient. They can do anything with the
email body they like.

Yes they *can* interpret it how they like, but in the Real World [tm] the
message *will* be interpreted as text/plain.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top