I have been using the standardized code (shown below) to send e-mails using the JavaMail API. The code works fine. Now, I have a number of e-mail recipients instead of only one. That is to say, I have a String Array and it is an Array of e-mail addresses. Consequently, I modified this line of code:
Do I have to make other modifications to this standardized code in order to send batch e-mails? I mean, does this standardized code also handle sending message to a number of different e-mail addresses?
Have you enabled SMTP debugging and checked what messages are being sent? Do you get an exception? Does JavaMail communicate with the server fine but you never see the messages? Have you created and registered Transport and Connection listeners to log whats going on? "does not seem to work" is not a popular phrase on this site with out a little more detail.
There is nothing in the JavaMail implementation to stop you bein able to do what you are trying (except manipulating the from address within a single session is frowned upon - though I've yet to find out why)