I use the code above to send mail with my local machine but the problem comes when I Uncomment path of the commented lines in other to send mail to the my yahoo and gmail account respectively:
My attempt to yahoo server gives:
javax.mail.MessagingException: Could not connect to SMTP host: yahoo.com, port:25, response: 421;
.....
.....
While my attempt to gmail server gives:
javax.mail.MessagingException: Could not connect to SMTP host: gmail.com, port:25;
.....
.....
Please let somebody help me check if there is something that am not getting right?
I use Apache Jamas Mail Server,
Thank for your help