• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JavaMail: Problem send mail to other host

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I send the mails to other counts belows the server of my company. When I send the mails using JavaMail to my count in other host ([email protected]) I recieve this eeror message:
javax.mail.SendFailedException: Sending failed;
nested exception is:
class javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
at javax.mail.Transport.send0(Transport.java:218)
at javax.mail.Transport.send(Transport.java:80)
at net.upaid.mail.MailSender.execute(MailSender.java:80)
at net.upaid.mail.MailSender.main(MailSender.java:130)
What I forget. Where is the error ?
Thanks.
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears to me that the mail program isn't allowed to send to that address. You probably need to talk to the system admin to allow it, or choose another address.
 
Haroldo Nascimento
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I think stranger is that I did not submit any password and account to server Mail to try send the mail. Thus, I can send e-mail to other account of mey Mai Server, BUT dont send to other server as hotmail, yahoo.
I will have that authentic in getInstrance() of Session to it works ??
My code is here:
props = System.getProperties();
props.put("mail.smtp.host", mailHost);

// Obtem a sess�o com valor Autenticador igual null
session = Session.getInstance(props, null);
session.setDebug(true);

msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
//msg.setFrom();
msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to, "111"));
//msg.setRecipients(Message.RecipientType.CC,InternetAddress.parse(cc, "22"));
msg.setSubject(subject);
collect(msg);
msg.setHeader("X-Mailer", mailer);
msg.setSentDate(new Date());
// send the thing off
Transport.send(msg);

thanks
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic