Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send java mail with big file attached

 
vishal kulkarni
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
Android Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic