I have some code that sends out an email from GMail. It is working on a command line program but it does not work in a Servlet. It throws an exception saying something like AuthenticationException.
But I double checked the code, it is almost the same for both command line program and Servlet. I don't understand why it behaves so strangely!
I would set JavaMail's debug mode on and send an e-mail in both environments: the one where authentication is successful and the one where it fails. See what is different.
Haina Minawa
Ranch Hand
Joined: Oct 13, 2011
Posts: 119
posted
0
Paul Clapham wrote:I would set JavaMail's debug mode on and send an e-mail in both environments: the one where authentication is successful and the one where it fails. See what is different.
Thanks, I will try in the debug mode then let you know.