I am trying to send email to an valid email address with my application. I did not understand but, it keeps saying invalid recipient although the email address is valid.
I am sure there is no any problem about my codes, but it is about the free SMTP server that I am using. Do you have any idea how to configure the SMTP to allow it relaying? Or do you have any suggestion for another free SMTP server.
I will really appreciate any answer I will have...
Thanks for the response. I add above the exceptions I am having in my my log file. Please notice my System.out.println lines in the codes.
It used to give null exception, because it was not going the lines after the MimeMessage. I redesigned and resubmitted my codes above,
I hope they are clearer..
Line 19 2009-09-20 14:42:17,390 INFO [STDOUT] DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 25, isSSL false
I copy/paste your code its working fine I am able to send mails.
Check your code or server properties.
Seems to be as if somewhere default port has been configured because program is still trying to connect port 25.
Hey, It really worked:)) Thank you very much for your suggestion. OOOvv my God, I have been struggling with this problem for almost a week. Before I tried
to use too many things, but none of them worked. What I did is, just activating the fort 465.
here is the code. I hope, it is going to be helpful for someone else..
I am sorry about disturbing you again but, I am having another problem now. I am trying to send email to and email list, consists from like just 5 emails.
The system does not give me any exceptions, but when I check the email addresses, I can not see any email has been sent. I checked my log file, and it says