在ASP.NET C#脚本中发送邮件 [英] mail sending in asp.net c# script

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

问题描述

如何检查防火墙以及如何确保防火墙未阻止发送邮件的端口?
请提供有关它的详细信息.谢谢...

How can I check firewall and how can I make sure that the firewall is not blocked the port for sending mail?
Please give the detailed information about it. Thanks...

推荐答案

如果您正在谈论Windows防火墙或家庭路由器中的某些防火墙,那么您需要开始阅读
If you''re talking about Windows Firewall or some firewall in a home router, then you need to start reading up on there[^] articles.


MailMessage message = new MailMessage("dk.mkcl@hotmail.com", "admin@yahoo.com", " Membership Confirmation email. pls do not reply ");
SmtpClient emailClient = new SmtpClient("xxx.xxx.xxx.xxx");
System.Net.NetworkCredential SMTPUserInfo = new System.Net.NetworkCredential("myserverhostloginid", "password");
emailClient.UseDefaultCredentials = false;
emailClient.Credentials = SMTPUserInfo;
emailClient.EnableSsl = true;
emailClient.Send(message);


jaheena写道:
jaheena wrote:

如何如何检查防火墙以及如何确保防火墙未阻止发送邮件的端口

How can I check firewall and how can I make sure that the firewall is not blocked the port for sending mail


禁用防火墙,然后重新运行您的程序,并检查邮件是否通过它.如果他们这样做,那就是防火​​墙问题.

它可以是Windows防火墙,也可以是您的防病毒防火墙.

关于端口,如果您使用自己的交换服务器,则需要(由您自己或IT团队)确保端口是开放的,并允许使用给定的凭据发送电子邮件.


Disable the firewall and re-run your program and check if mails are going through it or not. If they do then it is the firewall issue.

It can be windows firewall or your antivirus firewall.

About port, if you are using your own exchange server then you need to make sure(by yourself or IT team) that the ports are open and allowed to send email with a given credentials.


这篇关于在ASP.NET C#脚本中发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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