• Post Reply Bookmark Topic Watch Topic
  • New Topic

doubt using java mail

 
Veshnu Ramakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can i use arbitary host name to send email using java mail api or should there be an smtp sever running with that host name. i tried with arbitary host name and i got the exception.

javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.MessagingException: Unknown SMTP host: myDomain.com; nested exception is: java.net.UnknownHostException: myDomain.com
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeap an SMTP server should be running on the host you specify
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!