email : Java Glossary


Electronic mail.

Formatted vs Unformatted Email

Email comes in two main variants, plain text and formatted html. Formatted html has an undeserved bad reputation. Spammers The advantages of formatted email are:
  1. You can use font, colour and font size to emphasize the important parts of your message and deemphasise the unimportant parts, e. g. When elephants fight, it is the grass that suffers.
  2. You can embed images, photographs and diagrams.
  3. Bulleted lists and numbered lists are easy to create. The automatically reflow to fit the recipient’s screen size.
  4. You can embed hypertext links rather than including a giant bundle of information along with the email.
  5. The reader can decide the size of type. It will reflow automatically. This is particularly important for the visually impaired.
  6. In theory, you should be able to use tables to align material in columns. Unfortunately Eudora does not support tables.
  7. There is a way to mark parts of your message with <pre> or <code> tags so that spacing and line ends are precisely preserved. This way code examples don’t get mangled by newsreaders.
  8. Your messages have a more personal flavour. They don’t look exactly like everyone else’s.
  9. If you use Unicode, you can use words and phrases from any language you want. This does not require full HTML (Hypertext Markup Language) formatting.
The disadvantages of formatted email are:
  1. If you send them to someone with an old fashioned browser, they will have a hard time decoding them. Eudora refuses to keep track for you who has a modern and who has an old fashioned browser. You must keep it in your head.
  2. There is a temptation to spend too much time on the presentation and not enough on the content.
  3. They take longer to transmit because they contain invisible formatting tags.
  4. They can be easily mistaken for advertising spam.

Security and Privacy

Unfortunately compression, encryption and digital signing are not yet automatic in email. This means:
  1. Mail, especially mail with large enclosures, takes five times longer to send and receive than it should.
  2. Unpleasant people can snoop on your mail.
  3. Unpleasant people can send mail that looks as if you sent it
  4. You are inundated from mail from people you don’t want to hear from.
  5. Enclosures are send to you even when you don’t want them.

Outlook, Outlook Express and Eudora among others have plug-ins that clumsily support PGP digital signing and encryption.

Outlook, Outlook Express e-mail can do S/MIME (Secure Multipurpose Internet Mail Exchange) encrypted emails. Unfortunately Eudora still does not do S/MIME. Perhaps if enough people complain, the Eudora developers will stop fooling around decorating messages with chili peppers and get on with the bread and butter issues. software,

Because of the problem of requiring consensus for all sender and receiver email evolution has been extremely slow.

Email in Java

There are several mail protocols. The most common are SMTP to send mail and POP3 and to receive it.

To send email from a Java servlet, you usually would use JavaMail. Simple applications might use a home brew SMTP or JavaMail.

Applets are problematic. The mail server must be the one running on the same server as the Applet. You might use JavaMail or a home brew SMTP (Simple Mail Transfer Protocol) to talk to it. Unsigned Applets may not talk to any other server than the one it was loaded from.

SMTP is a mess when it comes to authorisation. Who is allowed to use the server? SMTP does not have a proper authentication method, just a bunch of ad hoc kludges. JavaMail does not get you off the hook. It has to use SMTP underneath.

To the mail server, send mail requests coming in from your Applet look like requests from the untamed wild world. It does not know your well behaved Applet is generating them. They will likely be refused, Further, your Applet could have been hacked by spammers.

Logically such requests should go to the user’s favourite mail server, where he will be welcome. However, even if you knew the URL (Uniform Resource Locator) of his mail server, you could not talk to it without the hassle of Applet signing.

So what to do?

Legal Format

There are two different standards for the format of an email address: and .

The official standard RFC 5322 says that you can create an email address of words (possibly joined together by dots), so long as you avoid the control characters 0..31, space and
A-Z +-=!#$%^&*~`?|/ are in theory all valid, though I would avoid all of them but -. Email addresses are case-insensitive.

In addition, quoted strings, (possibly joined by dots) are also valid. A quoted-string is any sequence of characters (0-127) except quote (), backslash (\) and CR (13), surrounded by quotes (). Even the three excepted characters can appear in a quoted-string if they are individually escaped with backslash. Anyone using a quotedstring style email address obviously does not want mail from the general public.

Email Clients

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number