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!

javax.mail.MessagingException: 501 5.0.0 Invalid domain name

843830Jun 18 2007 — edited Jun 25 2007
Hallo,

I want to send mails via sendmail.
but I get this error if I try to send.

The reason can be following :

in this company there are 2 mail servers mailext and mailint

our smtp server ist mailext but this use the mailint's certificate. (also the name is false) can this be a reason?? how can I set up that java accepts the certs with mailint too ?

these are the settings


String host="mailext.server";
String username = "username@server";
String password = "password";
String sender ="username@server";
String port = "25";

Properties props = new Properties();
props.put("mail.smtp.user", username);
props.put("mail.smtp.host", host);

props.put("mail.smtp.port", port);
props.put("mail.smtp.starttls.enable","true");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.debug", "true");
props.put("mail.smtp.socketFactory.port", port);


I have tried this code with googlemails setting and it functions.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2007
Added on Jun 18 2007
3 comments
1,577 views