Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Sending failed due to invalid destination address - HELP

843830May 7 2002 — edited Jun 20 2002
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for shoi
abm@hotmail.com

at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at msg.main(msg.java:70)
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for shoi
abm@hotmail.com

at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:848)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:323)
at javax.mail.Transport.send0(Transport.java:163)
at javax.mail.Transport.send(Transport.java:80)
at msg.main(msg.java:70)

***** Though i have given the recipent address correct, still i am getting this invalid address and sending failed exception, i really dont understand what is happening, b'cause the program is perfectly allriight, the only problem i think what could be is, the mail server should be having the problem, i just want to know how to rectify it and what is the solution.

Comments

DrClap
There's an FAQ for JavaMail here:

http://java.sun.com/products/javamail/FAQ.html

Search it for "relay".
843830
the 550 error code usually means that the mail server you connected with didn't want to relay your message (which is an option they often don't allow). lot of mail servers don't want you to use your own software so that you have to use their software (usually a browser account) so that they can show you all sorts of advertisements (I could be wrong about this, though). The SMTP will allow them to basically cut you off from using it unless you're actually logged onto the server itself (which I have yet to find a way, as its not part of SMTP -- it's part of the POP commands, but they can disable POP altogether).

If you want to keep developing in spite of this, though, try setting your own PC up to be a SMTP server with your own software or do a search for some small software called "agsmail" which is free. If you want to learn more about the SMTP commands (which those Java mail libraries are probably using behind the scenes) take a look at the RFC's for 'em.... here's the basic one for SMTP: http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2821.html
ref: a friend from community discussion
DrClap
lot of
mail servers don't want you to use your own software
so that you have to use their software (usually a
browser account) so that they can show you all sorts
of advertisements (I could be wrong about this,
though).
That may be part of it, but relaying is also used to send spam messages that cannot be traced back to their senders and to send messages that appear to be from somebody else.
843830
wow, this is a cut and paste from me... I feel so honored =]
843830
Thank You Dr. Clap and Mr. SeveronK, i have solved the problem and now i am able to send mails
But still iam in the development of a mail utility, which will have all the facilities, from the perspective of an organisation. i will definitely put it for free of cost, and you can keep a watch for more queries from me, which have a suffix -shoiab

thanks
shoiab
843830
I am having the same problem. What was the solution you found? Was it any of the ones they pointed out?
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 18 2002
Added on May 7 2002
6 comments
2,455 views