ASP .Net 1.1发送电子邮件 - 配置问题 [英] ASP .Net 1.1 Sending Emails - Configuration Question

查看:100
本文介绍了ASP .Net 1.1发送电子邮件 - 配置问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了它但是......

在我的代码中我根本没有指定smtp服务器。

所以我不是知道它在幕后使用的服务器。

我如何找到这个配置?

这是一个CDO配置吗?

我在注册表中找不到任何东西。

smtp服务器已被更改所以我试着去找出我需要更改它的地方 - 我的web.config中没有任何东西,我甚至都没有指定smtp服务器:-(

非常感谢!

使用System。 Web.Mail;

MailMessage msgMail = new MailMessage();

msgMail.To = toperson;

msgMail.From = fromperson;

msgMail.Subject = emailsubject;

msgMail.BodyFormat = MailFormat.Html;

msgMail.Body = emailbody;

SmtpMail.Send(msgMail);

解决方案

如果你没有指定一个,我认为它试图使用在本地计算机上运行的smtp服务器。没有用户名/密码,或者会使用Windows身份验证




有没有办法确定本地运行什么smtp?

或者我可以查看或修改的个人资料?

谢谢!!


它(几乎总是?)是在IIS服务下运行的SMTP服务(inetinfo.exe下)。您可以通过运行services.msc来验证它是否已启用。并向下滚动以查看简单邮件传输协议(SMTP)并查看它是否打开。


我不确定,但我想你可以从IIS控制面板以某种方式控制它(在管理工具下)

I got it working BUT......
In my code I don''t specify smtp server at all.
So I don''t know which server its using behind the scene.
How can I find out and where this configuration is?
Is this a CDO configuration?
I could not find anything in the registry.
The smtp server has been changed so i am tryin to figure out where I need to change it - nothing in my web.config and I don''t even specify smtp server :-(
Many thanks!
using System.Web.Mail;
MailMessage msgMail = new MailMessage();
msgMail.To = toperson;
msgMail.From = fromperson;
msgMail.Subject = emailsubject;
msgMail.BodyFormat = MailFormat.Html;
msgMail.Body = emailbody;
SmtpMail.Send(msgMail);

解决方案

If you don''t specify one, I think it tries to use an smtp server running on the local computer. Which either has no username/password, or would use the windows authentication


Hi,
Is there a way to determine what smtp is running locally?
or a profile or something I can look or modify?
Thanks!!


It will (almost always?) be the SMTP service which runs under the IIS service (inetinfo.exe). You can verify that it is enabled by running "services.msc" and scrolling down to see "Simple Mail Transfer Protocol (SMTP)" and see if it is on.

I don''t know for sure, but I would imagine you can control it from the IIS control panel somehow (under "Administrative Tools")


这篇关于ASP .Net 1.1发送电子邮件 - 配置问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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