javamail: confused by complexity of attachments

A

aaronfude

Hi,

I'm having difficulty dissecting messages with attachments. I'm working
with Multipart classes and I can actually get the attachments w/o a
problem, but when a message has an attachment, I'm having difficulty
getting the text of the email out seems it seems to come in a Multipart
in its own right.

What I'm wondering is:

Is there a tutorial on how to deal with these issues in a simple wayI
Is there a package with will take a message and return of Vector of
contents and attachments?

Very many thanks in advance!

Aaron Fude
 
M

Martin Gregorie

Hi,

I'm having difficulty dissecting messages with attachments. I'm working
with Multipart classes and I can actually get the attachments w/o a
problem, but when a message has an attachment, I'm having difficulty
getting the text of the email out seems it seems to come in a Multipart
in its own right.

What I'm wondering is:

Is there a tutorial on how to deal with these issues in a simple wayI
Is there a package with will take a message and return of Vector of
contents and attachments?
You can work out a lot of it by looking at the plain text (aka e-mail
source) of several e-mails. If that doesn't do it for you, go visit IETF
(http://www.ietf.org/rfc.html) and read the RFCs about MIME (RFC1341
looks like a good start). However, you should still look at e-mail
sources because there are a *lot* of e-mail clients out there that send
mail with broken MIME structures. Oddly enough, MS Outlook is one of the
worst for this.
 
G

Greg R. Broderick

If that doesn't do it for you, go visit IETF
(http://www.ietf.org/rfc.html) and read the RFCs about MIME (RFC1341
looks like a good start).

A thorough understanding of the following is invaluable:

RFC 821 – Simple Mail Transfer Protocol (August 1982)

RFC 2821 – Simple Mail Transfer Protocol (April 2001)

RFC 1651 – SMTP Service Extensions (July 1994)

RFC 1652 – SMTP Service Extension for 8-bit MIME transport (July 1994)

RFC 1653 – SMTP Service Extension for Message Size Declaration (July 1994)

RFC 822 – Standard for the Format of ARPA Internet Text Messages (August
1982)

RFC 2822 – Internet Message Format (April 2001)

RFC 1049 – A Content-type Header Field for Internet Messages (March 1988)

RFC 2045 – Multipurpose Internet Mail Extensions, Part One: Format of
Internet Message Bodies (November 1996)

RFC 2046 – Multipurpose Internet Mail Extensions, Part Two: Media Types
(November 1996)

RFC 2047 – Multipurpose Internet Mail Extensions (MIME), Part Three: Message
Header Extensions for Non-ASCII Text (November 1996)

RFC 2048 -- Multipurpose Internet Mail Extensions (MIME), Part Four:
Registration Procedures (November 1996)

RFC 2049 – Multipurpose Internet Mail Extensions (MIME), Part Five:
Conformance Criteria and Examples (November 1996)

RFC 2231 – MIME Parameter Value and Encoded Word Extensions: Character Sets,
Languages, and Continuations

RFC 2111 -- Content-ID and Message-ID Uniform Resource Locators

RFC 2183 – Communicating Presentation Information in Internet Messages: The
Content-Disposition Header Field.

RFC 2476 – Message Submission (December 1998)

RFC 2554 – SMTP Service Extension for Authentication (March 1999)

RFC 3207 – SMTP Service Extension for Secure SMTP over Transport Layer
Security (February 2002)

RFC 3013 / BCP 46 – Recommended Internet Service Provider Security Services
and Procedures (November 2000)

RFC 2076 -- Common Internet Message Headers

Common Internet Message Header Fields – an Internet draft revision to RFC
2076.

IANA Message Headers Registry - http://www.iana.org/assignments/message-
headers/message-header-index.html

IANA Character Set Registry - http://www.iana.org/assignments/character-sets

IANA MIME Content-Type Registry - http://www.iana.org/assignments/media-
types/index.html

Joel Spolsky, “The Absolute Minimum Every Software Developer Absolutely,
Positively Must Know About Unicode and Character Sets (No Excuses!)” -
http://www.joelonsoftware.com/articles/Unicode.html

http://www.i18nguy.com/unicode/codepages.html

http://czyborra.com/charsets/iso8859.html


Cheers
GRB



--
---------------------------------------------------------------------
Greg R. Broderick [rot13] (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
C

Chris Uppal

Greg said:
A thorough understanding of the following is invaluable:
[long list snipped]

Hmmm... You wouldn't be trying to scare him off, would you ?

;-)

-- chris
 
M

Monique Y. Mudama

Greg said:
A thorough understanding of the following is invaluable: [long list
snipped]

Hmmm... You wouldn't be trying to scare him off, would you ?

;-)

At least he didn't say it was necessary! Just invaluable ... hmmm ...
 
G

Greg R. Broderick

Greg said:
A thorough understanding of the following is invaluable: [long list
snipped]

Hmmm... You wouldn't be trying to scare him off, would you ?

Not at all! I'd implemented some code a while back using the JavaMail
API, and that is a list of the technical resources that I found to be
helpful, when I was writing my code.

Cheers
GRB
 

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