想从asp.net c中的任何邮件地址发送邮件 [英] want to send mail from any mail address in asp.net c#

查看:94
本文介绍了想从asp.net c中的任何邮件地址发送邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友

i希望使用不同的邮件服务器(gmail,yahoo,hotmail,rediffmail等)向许多配方发送邮件

我不想修改代码和写gt的smtp.gmail.com和hotmail的smpt.live.com

我想要一个通用代码...任何人都可以帮助我...

问候

hi friends
i want to send mail to many recipents using different mail servers(gmail,yahoo,hotmail,rediffmail etc)
I dont want to modify the code and write smtp.gmail.com for gmail and smpt.live.com for hotmail
I want a universal code...can anyone help me in this..
Regards

推荐答案

SMTP是一种通用协议,因此它适用于任何SMTP服务器。您可以做的是制作SMTP服务器列表并运行从这些服务器发送电子邮件的列表。没有一个通用的代码可以从所有这些代码发送,你需要创建帐户并保留一个列表。



重要的是要注意,大多数SMTP服务器要求您拥有一个帐户,然后才允许您与他们一起发送电子邮件。这意味着您必须为您使用的每个SMTP服务器提供登录详细信息。由于垃圾邮件机器人,大多数服务器都会关闭匿名SMTP。由于同样的原因,许多服务器也不允许您从帐户以外的电子邮件发送电子邮件(称为中继)。
SMTP is a universal protocol, so it should work with any SMTP server. What you can do is make a list of SMTP servers and run through the list sending email from those servers. There isn't a universal "code" out there to send from all of them, you need to make accounts and keep a list.

Its important to note though, that most SMTP servers require you have an account with them before they let you send email with them. That means you will have to provide login details for each SMTP server you use. Most servers shut down anonymous SMTP because of spam bots. A lot of servers also don't let you send email from an email other than the account (called relaying) for the same reason.


这篇关于想从asp.net c中的任何邮件地址发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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