Posted By:
John_Smith
Posted On:
Sunday, March 28, 2004 12:40 PM
Hi all, After wasting about 2 hours, I determined that Javamail (or perhaps my Internet service provider) was rejecting email addresses with two periods, i.e. "john.smith@anywhere.com." These are legal, at least with my internet service provider (Videotron). It also would throw an authentication failure exception (which apparently was NOT the problem). Anyone aware of this problem? Is there a workaround? PS. My code: Properties props = new Properties(); props.put("mail.host", "relais.videotron.ca"); Session mailSession = Session.getInstance(props, null); Address fromUser = new InternetAddress("aplace@videotron.com&
More>>
Hi all,
After wasting about 2 hours, I determined that Javamail (or perhaps my Internet service provider) was rejecting email addresses with two periods, i.e. "john.smith@anywhere.com." These are legal, at least with my internet service provider (Videotron). It also would throw an authentication failure exception (which apparently was NOT the problem).
Anyone aware of this problem? Is there a workaround?
PS. My code:
Properties props = new Properties();
props.put("mail.host", "relais.videotron.ca");
Session mailSession = Session.getInstance(props, null);
Address fromUser = new InternetAddress("aplace@videotron.com");
Address toUser = new InternetAddress(aEmail);
// aEmail comes from a database query.
Message body = new MimeMessage(mailSession);
body.setFrom(fromUser);
body.setRecipient(Message.RecipientType.TO, toUser);
body.setSubject("Election Alert, Hull-Aylmer");
body.setContent(HTMLtext, "text/HTML");
Transport.send(body);
out.println("
Message sent!
");
<<Less