This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes How to send java mail with big file attached Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to send java mail with big file attached " Watch "How to send java mail with big file attached " New topic
Author

How to send java mail with big file attached

vishal kulkarni
Greenhorn

Joined: Jul 28, 2009
Posts: 1
Hi

I have written an application using java swings and java mail to send .zip file as an attachment through java mail. The zip file contains mp3 files. I am selecting the zip file from local disk using jfilechooser. The application working perfectly, but it is taking 10 to 15 minutes to send mail with 2mb file attached.

the code to attach file is:




is there any way we can increase the performance.
Please reply to this post i am trying it from last 3 day's without success.
Pranav Raulkar
Ranch Hand

Joined: Apr 20, 2011
Posts: 73

Hi Vishal,

One way to increase performace is to do the attachment activity in seperate thread for each attachment.
The only thing you might need to watch out for is weather all the attachments have been attached when user tries to send the mail.

Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send java mail with big file attached
 
Similar Threads
JavaMail API error
How to send mail to more than one recipients
Email: java.lang.ClassFormatError
Sending attachments with emails in Javamail
Sending Mail via socket - attachments?