How to get the SMTP server from email address

后端 未结 4 1602
说谎
说谎 2021-01-28 21:43

I want to send mail automatically by special email account, but now, I only know the email address: tsp.monitor@qorosauto.com , and the password. so do you know how to get the

相关标签:
4条回答
  • 2021-01-28 22:02

    To find out the responsible mail server you have to ask the DNS. By using the web for example go to this nslookup page.

    Normally you start at the domain server of your provider, but you can also start with a root-server (e.g. 198.41.0.4) and ask for the domain google.com and the query type MX - Mail exchange.

    You'll get back a list of responsible dns server. Simply pick one out of the list (e.g. 192.26.92.30) and send the same query again to this server. Rerun this sequence till you'll get a list of type MX. Simply pick one address out of this list (maybe the first, maybe the one with the lost value in preference) and use this to establish your smtp connection.

    That's the way how every mail server does its work. Now it is up to you to implement that into your application. ;-)

    0 讨论(0)
  • 2021-01-28 22:14

    Trial and error might get you there..

    • mail.quorosauto.com
    • smtp.quorosauto.com
    • www.quorosauto.com
    • smtp.gmail.com

    If you've exausted every possibility you'll need to provide your own SMTP server. There are a few freebie servers:

    http://freesmtpservers.com/

    However if you are doing this professionally you probably want to use the SMTP server of your organization so you probably want to ask your boss or a colleague.

    0 讨论(0)
  • 2021-01-28 22:24

    You find the SMTP server of a domain by taking the host part of the email address (qorosauto.com in your example) and looking up the MX record for it.

    $ dig +short mx qorosauto.com
    10 euq2.qorosauto.com.
    5 euq1.qorosauto.com.
    

    The number before the hostname indicate preference - in this case euq1.qorosauto.com is the preferred server to connect to.

    Doing this in .Net is not straight-forward, as the answer to this question indicates: How to get mx records for a dns name with System.Net.DNS?

    To add to the problems, many ISPs will filter your connection in the firewall and won't let you talk to any SMTP server except the ISPs one, which in turn will relay the mail to the recipient.

    Essentially, you want to use your ISPs or organizations SMTP server - not the recipients MX.

    0 讨论(0)
  • 2021-01-28 22:27

    You may try mail.orosauto.com or smtp.orosauto.com. Login to you domain account and check mail settings. hopefully you can find the mail server details over there.

    0 讨论(0)
提交回复
热议问题