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.

com.sun.mail.smtp.SMTPAddressFailedException: 450

843830Dec 21 2006 — edited Dec 22 2006
Hello!
I have problem with sending message.
My code is:
          Properties props = new Properties();
          props.put("mail.smtp.host", "mail.my.pl");
          Session session = Session.getDefaultInstance(props, null);

          MimeMessage message = new MimeMessage(session);
          message.setText("message text");
          message.setSubject("message subject");
          Address addressFrom = new InternetAddress("p.lizurek@spot.pl");
          Address addressTo = new InternetAddress("inny@spot.pl");
          message.setFrom(addressFrom);
          message.addRecipient(Message.RecipientType.TO, addressTo);

          Transport.send(message);
When I try to send this message, I get this Exception:

13:36:09,500 INFO [STDOUT] javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 450 <frodo>: Helo command rejected: Host not found
13:36:09,500 INFO [STDOUT] at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
13:36:09,500 INFO [STDOUT] at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
13:36:09,500 INFO [STDOUT] at javax.mail.Transport.send0(Transport.java:169)
13:36:09,500 INFO [STDOUT] at javax.mail.Transport.send(Transport.java:98)
13:36:09,500 INFO [STDOUT] at pl.spot.onecom.onebox.web.action.SendMailAction.execute(SendMailAction.java:72)
...
...
...

Please, help me! The host, mail.my.pl, exist, but I get message that this host cant be found. What is going on?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2007
Added on Dec 21 2006
4 comments
1,097 views