This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes java mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "java mail" Watch "java mail" New topic
Author

java mail

prajapatisagar Sagar
Ranch Hand

Joined: Feb 28, 2011
Posts: 35
i am trying to send java mail but it takes 1 minute for sending one mail what is the problem that is making it so slow
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

Are you trying to attach big files in mail ?
Where is the SMTP server located. It could be because submission of mail to SMTP server taking long time.


SCJP SCWCD AIX SOA
The significant problems we face cannot be solved by the same level of thinking that created them -- Albert Einstein

prajapatisagar Sagar
Ranch Hand

Joined: Feb 28, 2011
Posts: 35
sourabh girdhar wrote:Are you trying to attach big files in mail ?
Where is the SMTP server located. It could be because submission of mail to SMTP server taking long time.


No there is so such big files i am sending email with html tags within it ,the transpond.send takes like 30 secs for sending 1 mail and i have to send email to around 500 mail its taking too much time and my session exipires around after 30 mails
sourabh girdhar
Ranch Hand

Joined: Feb 10, 2010
Posts: 71

Could not say anything for sure. 30 seconds for a mail is still ok . I am used to send mail to large number of users but my number of mails is limited, So I never noted the time.
If you want to send 500 mails , I should say prefer sending it by Unix. In any case that will work fast.
Let me know if you find some other solution.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
While 30 seconds does indeed sound long, you might be able to speed it up by having 10 threads send emails in parallel - something like this is I/O-bound, not CPU-bound, so you should achieve a nice speedup.


Ping & DNS - my free Android networking tools app
prajapatisagar Sagar
Ranch Hand

Joined: Feb 28, 2011
Posts: 35
thanks for responding to my post
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java mail