How do I send out mail using the JavaMail API without using an SMTP host provider?

Serge Knystautas

You cannot send out mail without any knowledge of who is receiving it. In JavaMail if you do not explicitly specify the outbound mail server, it will assume localhost. If you want to avoid using a single SMTP host provider to send outgoing messages, you can use a DNS library package (such as to query the MX records of the recipients of their message, and send the mail directly to their server.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact