How can I get the SMTP host name from email address?
===

I was working on an application which would send emails automatically at specific time intervals to a valid email. Searching through the internet I found that most of the codes use the existing email accounts such as gmail.com to send email by logging in as an SMTP client. But my problem is that I won't be knowing the smtp server name of the users email(since the user is not generally aware of these things though he will be knowing the login/passoword). For example,

someone@gmail.com should give smtp.gmail.com and port number (465)

someone@nextek.net should give mail.nextek.net and port number (?) 

someone@screaming.Net  smtp.tiscali.co.uk and port number (?)

I got the MX records using the domain name of the email address, but I realized that it actually gives the available incoming SMTP server names.

For example gmail.com would give gmail-smtp-in.l.google.com  along with four other server name if I ping using nslookup in command prompt.

Also what is the advantage of sending email by using an existing SMTP supporting email than sending directly by looking up the email server name through dns? Or is it not possible?

Correct me if I am wrong, since I am not much familiar with the protocols.





