I'm guessing that your Mail Transfer Agent (don't know what you're using - sendmail?) is only allowing relaying on your machine if the from address is localhost.
This is in order to stop email spammers from hijacking your mailserver and using it for mailshots. I'd talk to your sysadmin if you have one, if not you need to set up your MTA allow relaying to the hosts you need to use. Be VERY careful with this though, you could be putting a big security hole in your webserver which could leave you open to a denial of service attack. If this is case, your code is probably fine and the problem is in the environment the app is running in. >-----Original Message----- >From: Ewan Taylor [mailto:[EMAIL PROTECTED]] >Sent: Thursday, August 01, 2002 12:03 PM >To: [EMAIL PROTECTED] >Subject: javamail confusion... > > >hi there.. > >i am having a problem with a mail application that i am maintaining.. > >when atempting to send mail to certain external addresses i am >recieving >this error message.. > ><snip> >DEBUG SMTP SENT: RCPT TO:<[EMAIL PROTECTED]> >DEBUG SMTP RCVD: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] > >Invalid Addresses > [EMAIL PROTECTED] >DEBUG SMTPTransport: Sending failed because of invalid destination >addresses >DEBUG SMTP SENT: RSET >DEBUG SMTP RCVD: 250 2.0.0 Resetting ></snip> > >could anyone provide me with some pointers to help solve this problem? > >thank in advance > >ewan > >=============================================================== >===========To unsubscribe: mailto [EMAIL PROTECTED] with >body: "signoff JSP-INTEREST". >For digest: mailto [EMAIL PROTECTED] with body: "set >JSP-INTEREST DIGEST". >Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
