Re: SMTPTransport.sendMessage exception
Kez wrote:
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)
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
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.
--
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