Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

SMTPTransport.sendMessage exception

Thread view: 
Kez - 24 Nov 2006 11:45 GMT
I am getting the following exception in my code:

javax.mail.SendFailedException: 5.5.2 No valid recipients
       at gnu.mail.providers.smtp.SMTPTransport.sendMessage(Unknown
Source)
       at javax.mail.Transport.send0(Transport.java:151)
       at javax.mail.Transport.send(Transport.java:80)

I have 3 servers set up using this code, and only one of them gets this
error, so I expect it is a configuration issue.

I have checked the recipient is valid.

Any ideas what may be causing this?
Would this occur if the mail server was configured not to accept emails
being sent through it, or if the email server couldn't be contacted? I
would expect a different error in both of these cases.

Kerrin
Nigel Wade - 27 Nov 2006 10:59 GMT
> I am getting the following exception in my code:
>
> javax.mail.SendFailedException: 5.5.2 No valid recipients
>         at gnu.mail.providers.smtp.SMTPTransport.sendMessage(Unknown
> Source)

What is this package? I'm not familiar with it. Is it reliable?

>         at javax.mail.Transport.send0(Transport.java:151)
>         at javax.mail.Transport.send(Transport.java:80)
[quoted text clipped - 10 lines]
>
> Kerrin

It looks to me as though that particular server is failing to verify the
recipients correctly.

You seem to be connecting to the mail server, otherwise I'd expect a TCP related
error message. It's certainly possible that a mail server set up to not allow
relaying could give that error, if the recipients were not local. It's also
possible that it's a broken SMTP transport handler you are using.

I'd say you should check your mail server configuration, and logs to see if they
shed any light on the issue. If you can capture packets between the client and
the server that might help, the SMTP protocol is pretty simple (as its name
implies) and it should be fairly trivial to spot any errors in that.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.