如何在c#中获取SMTP名称? [英] How to get SMTP name in c#?

查看:82
本文介绍了如何在c#中获取SMTP名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个域名,例如yahoo.com。现在我想在c#代码中获取SMTP名称。现在,我知道Yahoo SMTP名称,我可以将其作为发送电子邮件的主机名传递。



我希望代码获取SMTP名称,例如我通过雅虎.in作为域名并接收smtp.Host =smtp.mail.yahoo.com; yahoo SMTP主机名。

我只想要一个代码将域名作为参数传递并将SMTP名称转换为变量。



请建议。



谢谢。

Hi,

I have a domain name with me for example yahoo.com. Now i want to get SMTP name in c# code. Now, i know Yahoo SMTP name and i can pass it as a Host name for sending an email.

I want code to get SMTP name for example i am passing yahoo.in as a domain name and receiving smtp.Host = "smtp.mail.yahoo.com"; yahoo SMTP host name.
I only want a code to pass domain name as a parameter and get SMTP name into a variable.

Please suggest.

Thanks.

推荐答案

请参考这篇SO帖子:

使用C#查找MX记录? [ ^ ]
Please refer to this SO post:
Finding the MX Record using C#?[^]


这篇关于如何在c#中获取SMTP名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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