怀疑发送电子邮件 [英] Doubt in sending email
本文介绍了怀疑发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好朋友,
我有一个通过应用程序发送电子邮件的查询.
我可以通过Gmail smtp服务器发送邮件,但是我要求它应该接受任何smtp服务器,并且应该能够使用该服务器发送邮件.
例如:gmail,Yahoo或hotmail等...
请让我知道是否有任何方法可以实现这一目标.
Hello Friends,
I have a query in sending email through application.
I am able to send mails through Gmail smtp server, but I have a requirement that it should accept any smtp server and should be able to send mails using that server.
ex:gmail,Yahoo or hotmail etc....
Please let me know if there is are any ways to achieve this.
推荐答案
这里有一个通用例程应允许这样做: ^ ]
There is a generic routine which should allow that here: Sending an Email in C# with or without attachments: generic routine.[^]
如果您是通过一台SMPT服务器完成此操作的,则可以通过任何其他服务器进行此操作.
唯一需要考虑的是服务器配置设置.
创建具有所有可能的服务器配置的数据类,并将其保存在文件中.创建一个UI来编辑此配置.为了保持持久性,我建议从此处开始数据合同: http://msdn.microsoft.com/en -us/library/ms733127.aspx [ ^ ].
—SA
If you have done this through one SMPT server, you can do it through any other.
The only think to take care of is the server configuration settings.
Create a data class with all possible server configuration and persist it in a file. Create a UI to edit this configuration. For persistence, I would recommend Data Contract, start from here: http://msdn.microsoft.com/en-us/library/ms733127.aspx[^].
—SA
这篇关于怀疑发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文