我应该选择哪个端口发送电子邮件 [英] Which port no i should choose to send email

查看:125
本文介绍了我应该选择哪个端口发送电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的codeproject成员
我希望您关注以下问题:

1.我在C#winform应用程序中有问题.我想从我的应用程序发送电子邮件,但我必须在运行时选择主机和端口号,例如smtp.mail.yahoo.com和端口号465或smtp.google.com等587.什么是最好的替代方法?

2.当我测试此应用程序时,安装在我的PC上的防病毒软件(快速修复)阻止了我的应用程序,并说这不是受信任的电子邮件客户端.如何将我的应用程序包含在以编程方式编写的防病毒/Windows可信电子邮件客户端列表中?

3.是否要求我们使用默认端口25或其他任何端口(例如465或587)?

在此先感谢

Dear codeproject members
I want your kind attention towards following problems:

1. I have a problem in C# winform application. I want to send email from my application but i have to choose the host and port number at runtime e.g. smtp.mail.yahoo.com and port no 465 or smtp.google.com etc. 587. what must be the best alternative to acoomplish this?

2. When I am testing this application then antivirus (quick heal) installed on my pc is blocking my application and saying that is not trusted email client. how can I include my application in antivirus / windows trusted email client list programmatic?

3. Is it required that we should use default port 25 or any other port like 465 or 587?

Thanks in advance

推荐答案

查找以下链接,这些链接对于使用C#发送电子邮件非常有用.您无需配置端口,电子邮件服务器会自动在内部使用端口.

http://social.msdn.microsoft.com/forums /en/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8/

http://www.c-sharpcorner.com /uploadfile/scottlysle/send-email-messages-and-attachments-using-C-Sharp/

查找以下链接,这些链接对于使用c#通过代码进行防病毒解除阻止电子邮件客户端很有用.

http://stackoverflow.com/questions/3194978/防止反病毒阻止带有C尖锐特征的外发电子邮件


希望有帮助!
Find following links useful for sending email using C#. You need to not to configure port, the email server automatically takes port internally.

http://social.msdn.microsoft.com/forums/en/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8/

http://www.c-sharpcorner.com/uploadfile/scottlysle/send-email-messages-and-attachments-using-C-Sharp/

Find following link useful for unblocking email client by antivirus through code using c#.

http://stackoverflow.com/questions/3194978/prevent-anti-virus-to-block-outgoing-email-with-c-sharp


Hope this help!


这篇关于我应该选择哪个端口发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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