C#发送电子邮件SMTP问题 [英] C# sending email SMTP problems

查看:244
本文介绍了C#发送电子邮件SMTP问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的我正在使用Visual Studio 2008 3.4 .net框架.
我想发送电子邮件,并且一切正常,但是我不知道我的SMTP服务器是什么,我怎么知道我要从hotmail发送电子邮件...
最好的问候

dears i am using visual studio 2008 3.4 .net frame work.
i want to send email and every thing is ok but i dont know what is my SMTP server how can i know that knowing that i want to send the email from hotmail ...
best regards

推荐答案

在端口25或587上使用smtp.live.com.
Use smtp.live.com on port 25 or 587.


Hotmail的帮助系统应为您提供帮助SMTP服务器的确切名称.在此处 [ ^ ].
The help system at Hotmail should give you the exact name of the SMTP server. Some suggestions may also be found here[^].


步骤



打开DOS命令提示符
键入"nslookup".
将显示计算机的DNS服务器名称和IP地址.
类型"set type = mx"-这将导致NSLOOKUP仅从DNS服务器返回所谓的MX(邮件交换)记录.
例如,键入"hotmail.com"或使用您自己的域名.
返回的结果应类似于以下内容:



伺服器:ns1.xxx.com

地址:192.168.0.1



非权威性答案:

hotmail.com MX首选项= 5,邮件交换器= mx2.hotmail.com

hotmail.com MX首选项= 5,邮件交换器= mx3.hotmail.com

hotmail.com MX首选项= 5,邮件交换器= mx4.hotmail.com

hotmail.com MX首选项= 5,邮件交换器= mx1.hotmail.com



hotmail.com名称服务器= ns1.hotmail.com

hotmail.com名称服务器= ns2.hotmail.com

hotmail.com名称服务器= ns3.hotmail.com

hotmail.com名称服务器= ns4.hotmail.com

mx2.hotmail.com互联网地址= 65.54.254.145

mx2.hotmail.com互联网地址= 65.54.252.230

mx2.hotmail.com互联网地址= 65.54.166.230

mx3.hotmail.com互联网地址= 65.54.254.140

mx3.hotmail.com互联网地址= 65.54.253.99

mx3.hotmail.com互联网地址= 65.54.167.5

mx4.hotmail.com互联网地址= 65.54.254.151

mx4.hotmail.com互联网地址= 65.54.253.230

mx4.hotmail.com互联网地址= 65.54.167.230

mx1.hotmail.com互联网地址= 65.54.254.129

mx1.hotmail.com互联网地址= 65.54.252.99

mx1.hotmail.com互联网地址= 65.54.166.99

ns1.hotmail.com互联网地址= 216.200.206.140

ns2.hotmail.com互联网地址= 216.200.206.139

ns3.hotmail.com互联网地址= 209.185.130.68

ns4.hotmail.com互联网地址= 64.4.29.24



请注意非权威性答案"之后的第一行.


"MX首选项"指定要使用的邮件服务器以及使用的顺序.数字越小,邮件服务器越优选.在这种情况下,由于每个邮件服务器的首选项相同,因此可以使用四个邮件交换器"中的任何一个.
Steps



Open a DOS Command Prompt
Type "nslookup".
Your computer''s DNS Server name and IP address will be displayed.
Type "set type=mx" - This will cause NSLOOKUP to only return what are known as MX (Mail eXchange) records from the DNS servers.
For an example, type "hotmail.com" or use your own domain name.
Results returned should look similar to this:



Server: ns1.xxx.com

Address: 192.168.0.1



Non-authoritative answer:

hotmail.com MX preference = 5, mail exchanger = mx2.hotmail.com

hotmail.com MX preference = 5, mail exchanger = mx3.hotmail.com

hotmail.com MX preference = 5, mail exchanger = mx4.hotmail.com

hotmail.com MX preference = 5, mail exchanger = mx1.hotmail.com



hotmail.com nameserver = ns1.hotmail.com

hotmail.com nameserver = ns2.hotmail.com

hotmail.com nameserver = ns3.hotmail.com

hotmail.com nameserver = ns4.hotmail.com

mx2.hotmail.com internet address = 65.54.254.145

mx2.hotmail.com internet address = 65.54.252.230

mx2.hotmail.com internet address = 65.54.166.230

mx3.hotmail.com internet address = 65.54.254.140

mx3.hotmail.com internet address = 65.54.253.99

mx3.hotmail.com internet address = 65.54.167.5

mx4.hotmail.com internet address = 65.54.254.151

mx4.hotmail.com internet address = 65.54.253.230

mx4.hotmail.com internet address = 65.54.167.230

mx1.hotmail.com internet address = 65.54.254.129

mx1.hotmail.com internet address = 65.54.252.99

mx1.hotmail.com internet address = 65.54.166.99

ns1.hotmail.com internet address = 216.200.206.140

ns2.hotmail.com internet address = 216.200.206.139

ns3.hotmail.com internet address = 209.185.130.68

ns4.hotmail.com internet address = 64.4.29.24



Note the first line after "Non-authoritative answer".


The "MX preference" specifies which mail server to use and in which order. The lower the number, the more preferred the mail server is. In this case, since the preferences for each mail server are the same, you can use any of the four "mail exchangers".


这篇关于C#发送电子邮件SMTP问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆