Thursday, 19 September 2013

sending mass email using java mail API

sending mass email using java mail API

I have a requirement of sending emails to approximately 15,000 email
addresses. Content of the email is same for all. I talked to my mail
server administrator and according to him I can send only 500 emails/
hour. I wrote an utility using java mail API to achieve this. I am
creating a connection(transport.connect()) and then reusing it. My utility
will be running for approx 30 hours to send all 15,000 emails. The
question I have "Is there any limit on number of emails being sent per
connection? And is there any time out issues I could run into? Should I
close the connection and get a new connection at some interval? like after
sending 100 emails or after 1 hour?"

No comments:

Post a Comment