*
The moose likes Java in General and the fly likes Automatic sending of email Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Automatic sending of email" Watch "Automatic sending of email" New topic
Author

Automatic sending of email

Ådne Brunborg
Ranch Hand

Joined: Aug 05, 2005
Posts: 208
In my current project, there is a method for automatic sending of email messages. I need to expand this method to attach a file, and there is no "addAttachment" method on javax.mail.Message or javax.mail.internet.MimeMessage



Entia non sunt multiplicanda praeter necessitatem
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Mime messages are made up of parts, so you don't add an attachement to the message, rather you create a part that is a file. For example:

[ November 15, 2006: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ådne Brunborg
Ranch Hand

Joined: Aug 05, 2005
Posts: 208
Thank you
 
wood burning stoves
 
subject: Automatic sending of email