I am new to Java mail. I have tested a mail send program. It is working on smtp.sify.com and it is sending mail only when "To" address created in Sify mail server. I tried to use smtp.yahoo.com & smtp.gmail.com and not working. Please help me.
In order to send mail you need to access and mail server. You may not use yahoo or gmail since you are not authenticated to use it. You need to give your user name and password to use that server for sendin mail.
For sending and receiving mails you can use
Apache James server. Take sometime learn e-mail basics and especially James server so that you can set up your own mail server on your machine and send and receive them.