Java send email avoiding smtp relay server and send directly to MX server
I'm trying to send an email directly to the destination MX server, avoiding the relay smtp server. Teorically it could be possible getting the name servers list doing a query to a dns server. So, using this class, http://www.eyeasme.com/Shayne/MAILHOSTS/mailHostsLookup.html , I can get a list of the mail exchange servers of a domain. So, once I have that, how can I proceed to send the email? I should use javax.mail or how? And if is it, how I should configure it? Okay, so suppose we do that. We do DNS-Lookup to fetch MX records for recipient domain. Next step would be to connect to that server