Posted By:
Gautam_Marwaha
Posted On:
Thursday, December 12, 2002 10:48 PM
You are probably doing one or more of the following:
1. setting email ids in the wrong format for the recipient
2. the SMTP server does not relay mails to any domain other than the ones configured on it. By default, most servers running SMTP service on your network will relay local mails which have the same domain name as the server. Try sending a mail to an address in the same domain - something like yourself@youdomain.com and if that works check the server configuration settings for relaying
3. you are probably trying to send email using an SMTP server on the internet which very rightly will not relay mails for you. Use your own SMTP server which is configured to relay mails and has acccess to DNS server(s)
To start with set session.setDebug(true) and try your program again - will show you more detailed info on what's going on
Also see http://www.jguru.com/faq/view.jsp?EID=352951