Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

javamail: confused by complexity of attachments

Thread view: 
aaronfude@gmail.com - 20 Apr 2006 00:45 GMT
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
Martin Gregorie - 20 Apr 2006 02:13 GMT
> Hi,
>
[quoted text clipped - 9 lines]
> 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.

Signature

martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Greg R. Broderick - 20 Apr 2006 11:46 GMT
Martin Gregorie <martin@see.sig.for.address> wrote in news:4446e179.0
@entanet:

> 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

Signature

---------------------------------------------------------------------
Greg R. Broderick                 [rot13] terto@oynpxubyvb.qlaqaf.bet

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

Chris Uppal - 20 Apr 2006 13:28 GMT
> A thorough understanding of the following is invaluable:
> [long list snipped]

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

;-)

   -- chris
Monique Y. Mudama - 20 Apr 2006 18:00 GMT
>> 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 ...

Signature

monique

Help us help you:
http://www.catb.org/~esr/faqs/smart-questions.html

Greg R. Broderick - 20 Apr 2006 20:27 GMT
>> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.