Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create a MimeMessage from a RFC2822-formatted String

843834Mar 5 2009 — edited Mar 6 2009
Hi,

Could you suggest a way to create a MimeMessage from a String which is in the RFC2822 format?

For example,
String message = "From: John Doe <jdoe@machine.example> \n" + "To: Mary Smith <mary@example.net> \n"
+ "Subject: Saying Hello \n"
+ "Date: 21 Nov 97 09:55:06 GMT \n"
+ "Message-ID: <1234@local.machine.example> \n\n"
+ "This is a message just to say hello. \n";

Do you perhaps know a parser or a framework which offers support for this?

Thanks

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 3 2009
Added on Mar 5 2009
1 comment
225 views