I am needing to do some automatic email sending daily on a daily basis to say…for the sake of simplicity 1000 messages. What is the best way to accomplish this using java?
The plan of action right now is to basically just run a loop and send the messages one by one. Should I be taking a more complex approach using multiple threads, or somehow batching messages? I admit I am a total noob when it comes to managing email so I am more or less just looking for some suggestions to get me started.
With JavaMail, you can open a mail
Sessionand send all yourMimeMessage(as many as you want) and when you’re done, close theSession. No need to keep opening a session, send a message and close.