• <legend id='ATTGi'><style id='ATTGi'><dir id='ATTGi'><q id='ATTGi'></q></dir></style></legend>
      <bdo id='ATTGi'></bdo><ul id='ATTGi'></ul>

      <tfoot id='ATTGi'></tfoot>

      <i id='ATTGi'><tr id='ATTGi'><dt id='ATTGi'><q id='ATTGi'><span id='ATTGi'><b id='ATTGi'><form id='ATTGi'><ins id='ATTGi'></ins><ul id='ATTGi'></ul><sub id='ATTGi'></sub></form><legend id='ATTGi'></legend><bdo id='ATTGi'><pre id='ATTGi'><center id='ATTGi'></center></pre></bdo></b><th id='ATTGi'></th></span></q></dt></tr></i><div id='ATTGi'><tfoot id='ATTGi'></tfoot><dl id='ATTGi'><fieldset id='ATTGi'></fieldset></dl></div>

        <small id='ATTGi'></small><noframes id='ATTGi'>

      1. 如何从电子邮件地址获取 SMTP 服务器

        How to get the SMTP server from email address(如何从电子邮件地址获取 SMTP 服务器)

      2. <tfoot id='9Xoah'></tfoot>
        <i id='9Xoah'><tr id='9Xoah'><dt id='9Xoah'><q id='9Xoah'><span id='9Xoah'><b id='9Xoah'><form id='9Xoah'><ins id='9Xoah'></ins><ul id='9Xoah'></ul><sub id='9Xoah'></sub></form><legend id='9Xoah'></legend><bdo id='9Xoah'><pre id='9Xoah'><center id='9Xoah'></center></pre></bdo></b><th id='9Xoah'></th></span></q></dt></tr></i><div id='9Xoah'><tfoot id='9Xoah'></tfoot><dl id='9Xoah'><fieldset id='9Xoah'></fieldset></dl></div>
            <bdo id='9Xoah'></bdo><ul id='9Xoah'></ul>
              <tbody id='9Xoah'></tbody>
          • <small id='9Xoah'></small><noframes id='9Xoah'>

            1. <legend id='9Xoah'><style id='9Xoah'><dir id='9Xoah'><q id='9Xoah'></q></dir></style></legend>

                  本文介绍了如何从电子邮件地址获取 SMTP 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想通过特殊的邮箱账户自动发送邮件,但现在我只知道邮箱地址:tsp.monitor@qorosauto.com 和密码.那么你知道如何获取 SMTP 服务器吗?下面是我的 C# 代码:

                  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 SMTP server. below is my C# code:

                          SmtpClient client = new SmtpClient();
                  
                          client.Host = "What is the SMTP Server, I want to get from email address, can you help me";
                          string account = "tsp.monitor@qorosauto.com";
                          string password = "Qoros111";
                  
                          client.Port = 587;
                          client.EnableSsl = true;
                          client.Timeout = 100000;                
                  
                          client.DeliveryMethod = SmtpDeliveryMethod.Network;
                          client.UseDefaultCredentials = false;
                          client.Credentials = new System.Net.NetworkCredential(account, password);
                  

                  推荐答案

                  您通过获取电子邮件地址的主机部分(在您的示例中为 qorosauto.com)找到域的 SMTP 服务器,并且查找 MX 记录 .

                  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.
                  

                  主机名前的数字表示偏好 - 在这种情况下,euq1.qorosauto.com 是要连接的首选服务器.

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

                  在 .Net 中执行此操作并不简单,因为此问题的答案表明:如何使用 System.Net.DNS 获取 dns 名称的 mx 记录?

                  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?

                  更糟糕的是,许多 ISP 会在防火墙中过滤您的连接,并且不允许您与除 ISP 之外的任何 SMTP 服务器通信,而后者又会将邮件转发给收件人.

                  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.

                  基本上,您想使用您的 ISP 或组织的 SMTP 服务器 - 而不是收件人的 MX.

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

                  这篇关于如何从电子邮件地址获取 SMTP 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Populate ListBox with a IEnumrable on another thread (winforms)(在另一个线程(winforms)上使用 IEnumrable 填充 ListBox)
                  listbox selected item give me quot; System.Data.DataRowViewquot; , C# winforms(列表框选择的项目给我quot;System.Data.DataRowView, C# Winforms)
                  Cannot remove items from ListBox(无法从列表框中删除项目)
                  Preventing ListBox scrolling to top when updated(更新时防止列表框滚动到顶部)
                  Drag and drop from list to canvas on windows phone with MVVM(使用 MVVM 在 Windows 手机上从列表拖放到画布)
                  Deselection on a WPF listbox with extended selection mode(具有扩展选择模式的 WPF 列表框上的取消选择)
                    <tbody id='NlxQL'></tbody>
                    <bdo id='NlxQL'></bdo><ul id='NlxQL'></ul>
                    1. <i id='NlxQL'><tr id='NlxQL'><dt id='NlxQL'><q id='NlxQL'><span id='NlxQL'><b id='NlxQL'><form id='NlxQL'><ins id='NlxQL'></ins><ul id='NlxQL'></ul><sub id='NlxQL'></sub></form><legend id='NlxQL'></legend><bdo id='NlxQL'><pre id='NlxQL'><center id='NlxQL'></center></pre></bdo></b><th id='NlxQL'></th></span></q></dt></tr></i><div id='NlxQL'><tfoot id='NlxQL'></tfoot><dl id='NlxQL'><fieldset id='NlxQL'></fieldset></dl></div>

                      <small id='NlxQL'></small><noframes id='NlxQL'>

                          • <legend id='NlxQL'><style id='NlxQL'><dir id='NlxQL'><q id='NlxQL'></q></dir></style></legend>
                            <tfoot id='NlxQL'></tfoot>