The output of the above code is ---> Completed now without any errors
but mail not received at receipient.... code running without correct ouput
Joined: Mar 22, 2005
I doubt that you can send email through Google's mail server without using any authentication. Lack of it should cause an exception, though. By the way, don't get in the habit of having empty catch clauses - exceptions need to be properly dealt with, and at the very least be logged somewhere.
you need to implement Authenticator in order to send mail with Gmail account. When you create session, you need to use the two arguments Contructor method. the properties should include <prop key="mail.smtps.auth">true</prop>.
Do you know why this cup is useful? Because it is empty.