-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple Java Mail from MimeMessage #22
Comments
If you provide an implementation or piece of code that fills an |
The truth is, MimeMessage is a ambiguous type tree structure. The |
On the other hand, Apache seems to have an implementation already. I might just use some of that. |
@neil-ceschi, I implemented a MimeMessage parser based on Apache's version. I had to modify a few a few things: headers were not parsed in Apache's version and attachments and embedded images were not properly distinguished (they ignored I'll release a new version somewhere this week when I have the time. Releasing always takes me more time than implementing an actual fix :/ Usage: Email email = new Email(yourMimeMessage);
// the other way around is now possible too!
MimeMessage mimeMessage = Mailer.produceMimeMessage(yourEmail, yourSession /* or null */); The following should be true then: Email emailSource = new Email();
/* populate email... */
Email emailTarget = new Email(mailer.produceMimeMessage(emailSource, null));
emailSource.equals(emailTarget); |
…essage)) 2. exposed produceMimeMessage in Mailer, so you can play with that too 3. added toString support for Recipient
Release in v3.0.0! Demo included in |
I would need to handle files saved in .eml format, easily convertible into MimeMessage. It would be great to build SimpleMail from MimeMessage!
Thanks a lot!
The text was updated successfully, but these errors were encountered: