无法使用SMTP发送电子邮件 [英] Cannot send email using SMTP

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

问题描述

我们开发了商业ASP.net应用程序

(个人营养管理和跟踪);我们想要

从其中发送smtp电子邮件。


对于我们的开发盒,我们使用WinXP Pro,IIS 5.5,

VisualStudio2002,VB作为编程语言。我们的

测试/开发版本的网络应用程序托管在

我们的localhost工作良好;我们的默认SMTP虚拟

服务器正在运行(根据IIS控制台)。


我们的简单测试页面(EmailTest.aspx)位于单独的

项目中,只有一个按钮,我们正在尝试使用以下代码在EmailTest.aspx.vb上使用以下代码:


Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)处理Button1.Click


Dim OK As New Mail.MailMessage()

OK.From =" ; bo ****** @ toad.net"

OK.Subject ="测试"

OK.Body =尝试发送电子邮件

OK.To =" bo*@cookbookplus.com"

Mail.SmtpMail.SmtpServer =" localhost"


邮件.SmtpMail.Send(OK)


End Sub


Mail.SmtpMail.Send(OK)行总是抛出一个

例外;我们总是收到此错误:


服务器拒绝了一个或多个收件人地址。

服务器响应为:550 5.7.1无法转发
bo *@cookbookplus.com.com


收件人是谁也无所谓。我们是通过DSL连接到互联网的
。否则,与我们的东西相关的其他所有内容似乎都能完美运行。


花了太多工时研究帮助文件,

MSDN KnowledgeBase等没有运气。我相信我们是错误的,但不知道是什么。


我们之前唯一的电子邮件代码经验是

使用VBA进行MS访问。我们知道这是我们的错误,只是这样做。不知道如何帮助自己。此外,网络应用程序是我们的

首次尝试使用ASP.net等。一般来说,应用程序工作

效果很好!


任何人都可以帮忙;或者提供一个很好的例子我们可以跟随它们吗?


仅供参考,我们的网站 http://www.cookbookplus.com

如果好奇,你可以看到使用
$的应用程序b $ bCookBookPlusOnTheWeb主页上的链接。


或者使用
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb

aspx直接链接。


该应用程序托管在Windows Server 2003系统上,因此我们所做的一切都必须在部署时与IIS 6一起使用。


谢谢。

Bob Jones
bo******@toad.net bo *@cookbookplus.com

4106267564

解决方案

如果你改变了怎么办

Mail.SmtpMail.SmtpServer =" localhost"

to

Mail.SmtpMail.SmtpServer =" xxx.xxx.xxx.xxx"

是IP地址


另外,我正在运行一个使用的IIS服务器SMTP用于在有交换服务器的

环境中发送电子邮件。我们不得不在交换服务器上设置一些东西,以允许IIS电子邮件发送SMTP邮件。


我认为这可能是你的问题。


Bob Jones <博****** @ toad.net>在消息中写道

news:0a **************************** @ phx.gbl ... < blockquote class =post_quotes>我们开发了一个商业ASP.net应用程序
(个人营养管理和跟踪);我们想从其中发送smtp电子邮件。

对于我们的开发盒,我们使用WinXP Pro,IIS 5.5,VisualStudio2002,VB作为编程语言。我们的
测试/开发版本的Web应用程序托管在我们的localhost上。工作良好;我们的默认SMTP虚拟服务器正在运行(根据IIS控制台)。

我们的简单测试页面(EmailTest.aspx)是一个单独的项目,只有一个按钮,我们正在尝试
在EmailTest.aspx.vb上使用以下代码:

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)处理Button1.Click

Dim OK As New Mail.MailMessage()
OK.From =" bo ****** @ toad.net"
OK.Subject =" Test"
OK.Body =尝试发送电子邮件
OK.To =" bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer =" localhost"
Mail.SmtpMail.Send(OK)

End Sub

Mail.SmtpMail.Send(OK)行总是抛出一个
异常;我们总是收到此错误:

服务器拒绝了一个或多个收件人地址。
服务器响应如下:550 5.7.1无法转发
bo *@cookbookplus.com.com

收件人是谁也没关系。我们通过DSL连接到互联网。否则,与我们的东西相关的其他一切看起来都很完美。

花了太多工时研究帮助文件,MSDN KnowledgeBase等等。没有运气。我确信我们做错了,但不知道是什么。

我们唯一的电子邮件代码经验是使用VBA进行MS Access。我们知道这是我们的错误,只是不知道如何帮助自己。此外,网络应用程序是我们首先尝试使用ASP.net等。一般来说,应用程序工作
工作得很好!

任何人都可以请求帮助;或者提供一个我们可以遵循的好例子?

我们的网站是 http://www.cookbookplus.com

如果好奇,你可以使用
CookBookPlusOnTheWeb看到该应用程序。主页上的链接。

或使用
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb
aspx直接链接。

该应用程序托管在Windows Server 2003系统上所以我们所做的一切都必须在部署时与IIS 6一起使用。

谢谢。
Bob Jones
bo ****** @ toad.net
bo *@cookbookplus.com
4106267564



嗨乔治,


感谢您的回复;但没有运气。


尝试使用我们的IP而不是localhost;得到此错误

代替:传输无法连接到服务器。


这里没有Exchange Server参与我们

根本不使用它。


我仍​​然需要帮助。


Bob

-----原始消息-----
如果你改变了Mail.SmtpMail.SmtpServer =" localhost"
Mail.SmtpMail.SmtpServer =会发生什么? xxx.xxx.xxx.xxx
是IP地址

此外,我正在运行一个IIS服务器,它使用SMTP在环境中发送
电子邮件交换服务器。我们不得不在交换服务器上设置
以允许IIS电子邮件发送SMTP
邮件。
我认为这可能是你的问题。

Bob Jones ; <博****** @ toad.net>在消息中写道
新闻:0a **************************** @ phx.gbl ...

我们开发了一个商业ASP.net应用程序
(个人营养管理和跟踪);我们希望
从其中发送smtp电子邮件。

对于我们的开发盒,我们使用WinXP Pro,IIS 5.5,VisualStudio2002,VB作为编程语言。我们的
测试/开发版本的Web应用程序托管在我们的localhost上。工作良好;我们的默认SMTP虚拟服务器正在运行(根据IIS控制台)。

我们的简单测试页面(EmailTest.aspx)是一个单独的项目,只有一个按钮,我们正在尝试
在EmailTest.aspx.vb上使用以下代码:

Private Sub Button1_Click(ByVal sender As
System.Object,ByVal e As System.EventArgs)处理Button1.Click

Dim OK As New Mail.MailMessage()
OK.From =" bo ****** @ toad.net"
OK.Subject =" Test"
OK.Body =尝试发送电子邮件
OK.To =" bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer =" localhost"
Mail.SmtpMail.Send(OK)

End Sub

Mail.SmtpMail.Send(OK)行总是抛出一个
异常;我们总是收到此错误:

服务器拒绝了一个或多个收件人地址。
服务器响应为:550 5.7.1无法转发
bo *@cookbookplus.com.com

收件人是谁也没关系。我们
通过DSL连接到互联网。否则,
与我们的东西相关的其他所有内容似乎都能完美运行。

花了太多工时研究帮助
文件,MSDN KnowledgeBase等等。没有运气。我确信我们做错了,但不知道是什么。

我们唯一的电子邮件代码经验是使用VBA进行MS Access。我们知道这是我们的错误,只是
不知道如何帮助自己。此外,网络应用程序是
我们第一次尝试使用ASP.net等。一般来说,应用程序工作
效果很好!

任何人都可以帮助;或者提供一个很好的例子,我们可以跟随b $ b吗?

我们的网站是 http://www.cookbookplus.com

如果好奇,你可以使用
CookBookPlusOnTheWeb看到该应用程序。主页上的链接。

或使用
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb 。 aspx用于直接链接。

该应用程序托管在Windows Server 2003系统上,因此我们所做的任何事情都必须在部署时与IIS 6一起使用。

谢谢你好。
Bob Jones
bo******@toad.net bo *@cookbookplus.com
4106267564





" mail.yourSMTPDomainNameHere.com"

" smtp.yourSMTPDomainNameHere.com"


或尝试空白"


" Bob Jones" <博****** @ toad.net>在消息中写道

news:0a **************************** @ phx.gbl ... < blockquote class =post_quotes>我们开发了一个商业ASP.net应用程序
(个人营养管理和跟踪);我们想从其中发送smtp电子邮件。

对于我们的开发盒,我们使用WinXP Pro,IIS 5.5,VisualStudio2002,VB作为编程语言。我们的
测试/开发版本的Web应用程序托管在我们的localhost上。工作良好;我们的默认SMTP虚拟服务器正在运行(根据IIS控制台)。

我们的简单测试页面(EmailTest.aspx)是一个单独的项目,只有一个按钮,我们正在尝试
在EmailTest.aspx.vb上使用以下代码:

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)处理Button1.Click

Dim OK As New Mail.MailMessage()
OK.From =" bo ****** @ toad.net"
OK.Subject =" Test"
OK.Body =尝试发送电子邮件
OK.To =" bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer =" localhost"
Mail.SmtpMail.Send(OK)

End Sub

Mail.SmtpMail.Send(OK)行总是抛出一个
异常;我们总是收到此错误:

服务器拒绝了一个或多个收件人地址。
服务器响应如下:550 5.7.1无法转发
bo *@cookbookplus.com.com

收件人是谁也没关系。我们通过DSL连接到互联网。否则,与我们的东西相关的其他一切看起来都很完美。

花了太多工时研究帮助文件,MSDN KnowledgeBase等等。没有运气。我确信我们做错了,但不知道是什么。

我们唯一的电子邮件代码经验是使用VBA进行MS Access。我们知道这是我们的错误,只是不知道如何帮助自己。此外,网络应用程序是我们首先尝试使用ASP.net等。一般来说,应用程序工作
工作得很好!

任何人都可以请求帮助;或者提供一个我们可以遵循的好例子?

我们的网站是 http://www.cookbookplus.com

如果好奇,你可以使用
CookBookPlusOnTheWeb看到该应用程序。主页上的链接。

或使用
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb
aspx直接链接。

该应用程序托管在Windows Server 2003系统上所以我们所做的一切都必须在部署时与IIS 6一起使用。

谢谢。
Bob Jones
bo ****** @ toad.net
bo *@cookbookplus.com
4106267564



We have developed a commercial ASP.net application
(personal nutrition management and tracking); we want to
send smtp email from within it.

For our development box, we use WinXP Pro, IIS 5.5,
VisualStudio2002, VB as programing language. Our
test/development version of the web app as hosted on
our "localhost" works fine; our "Default SMTP Virtual
Server" is running (per the IIS console).

Our simple test page (EmailTest.aspx)is in a separate
project, has only a single button and we are trying to
use the following code on the EmailTest.aspx.vb:

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

Dim OK As New Mail.MailMessage()
OK.From = "bo******@toad.net"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer = "localhost"

Mail.SmtpMail.Send(OK)

End Sub

The line Mail.SmtpMail.Send(OK) always throws an
exception; we always get this error:

The server rejected one or more recipient addresses. The
server response was: 550 5.7.1 Unable to relay for
bo*@cookbookplus.com.com .

It does not matter who the recipient is, either. We are
connected to the internet via DSL. Otherwise, everything
else related to our stuff seems to work perfectly.

Have spent way too many man hours researching help files,
MSDN KnowledgeBase, etc. No luck. I am sure we are
doing soming wrong, but have no idea what.

Our only prior experience with email code has been with
MS Access using VBA. We know this is our mistake, just do
not know how to help ourselves. Also, the web app is our
first try using ASP.net, etc. Generally, the app works
works great!

Can anyone please help; or provide a good example we can
follow?

FYI, our web site is http://www.cookbookplus.com

If curious, you can see the app using
the "CookBookPlusOnTheWeb" link on the home page.

Or use
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb.
aspx for a direct link.

The app is hosted on a Windows Server 2003 system so
whatever we do must work with IIS 6 when we deploy.

Thank you.
Bob Jones
bo******@toad.net
bo*@cookbookplus.com
4106267564

解决方案

what happens if you change
Mail.SmtpMail.SmtpServer = "localhost"
to
Mail.SmtpMail.SmtpServer = "xxx.xxx.xxx.xxx"
being the IP address

Also, I am running an IIS server that uses SMTP to send email in an
evironment where there is an exchange server. We had to setup something in
the exchange server to allow the IIS email to send SMTP mail.

I think that might be your issue.

"Bob Jones" <bo******@toad.net> wrote in message
news:0a****************************@phx.gbl...

We have developed a commercial ASP.net application
(personal nutrition management and tracking); we want to
send smtp email from within it.

For our development box, we use WinXP Pro, IIS 5.5,
VisualStudio2002, VB as programing language. Our
test/development version of the web app as hosted on
our "localhost" works fine; our "Default SMTP Virtual
Server" is running (per the IIS console).

Our simple test page (EmailTest.aspx)is in a separate
project, has only a single button and we are trying to
use the following code on the EmailTest.aspx.vb:

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

Dim OK As New Mail.MailMessage()
OK.From = "bo******@toad.net"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer = "localhost"

Mail.SmtpMail.Send(OK)

End Sub

The line Mail.SmtpMail.Send(OK) always throws an
exception; we always get this error:

The server rejected one or more recipient addresses. The
server response was: 550 5.7.1 Unable to relay for
bo*@cookbookplus.com.com .

It does not matter who the recipient is, either. We are
connected to the internet via DSL. Otherwise, everything
else related to our stuff seems to work perfectly.

Have spent way too many man hours researching help files,
MSDN KnowledgeBase, etc. No luck. I am sure we are
doing soming wrong, but have no idea what.

Our only prior experience with email code has been with
MS Access using VBA. We know this is our mistake, just do
not know how to help ourselves. Also, the web app is our
first try using ASP.net, etc. Generally, the app works
works great!

Can anyone please help; or provide a good example we can
follow?

FYI, our web site is http://www.cookbookplus.com

If curious, you can see the app using
the "CookBookPlusOnTheWeb" link on the home page.

Or use
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb.
aspx for a direct link.

The app is hosted on a Windows Server 2003 system so
whatever we do must work with IIS 6 when we deploy.

Thank you.
Bob Jones
bo******@toad.net
bo*@cookbookplus.com
4106267564



Hi George,

Thanks for the reply; but no luck.

Tried using our IP instead of "localhost"; get this error
instead: The transport failed to connect to the server.

No Exchange Server involvement here possible either as we
do not use it at all.

I still need help.

Bob

-----Original Message-----
what happens if you change
Mail.SmtpMail.SmtpServer = "localhost"
to
Mail.SmtpMail.SmtpServer = "xxx.xxx.xxx.xxx"
being the IP address

Also, I am running an IIS server that uses SMTP to send email in anevironment where there is an exchange server. We had to setup something inthe exchange server to allow the IIS email to send SMTP mail.
I think that might be your issue.

"Bob Jones" <bo******@toad.net> wrote in message
news:0a****************************@phx.gbl...

We have developed a commercial ASP.net application
(personal nutrition management and tracking); we want to send smtp email from within it.

For our development box, we use WinXP Pro, IIS 5.5,
VisualStudio2002, VB as programing language. Our
test/development version of the web app as hosted on
our "localhost" works fine; our "Default SMTP Virtual
Server" is running (per the IIS console).

Our simple test page (EmailTest.aspx)is in a separate
project, has only a single button and we are trying to
use the following code on the EmailTest.aspx.vb:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim OK As New Mail.MailMessage()
OK.From = "bo******@toad.net"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer = "localhost"

Mail.SmtpMail.Send(OK)

End Sub

The line Mail.SmtpMail.Send(OK) always throws an
exception; we always get this error:

The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for
bo*@cookbookplus.com.com .

It does not matter who the recipient is, either. We are connected to the internet via DSL. Otherwise, everything else related to our stuff seems to work perfectly.

Have spent way too many man hours researching help files, MSDN KnowledgeBase, etc. No luck. I am sure we are
doing soming wrong, but have no idea what.

Our only prior experience with email code has been with
MS Access using VBA. We know this is our mistake, just do not know how to help ourselves. Also, the web app is our first try using ASP.net, etc. Generally, the app works
works great!

Can anyone please help; or provide a good example we can follow?

FYI, our web site is http://www.cookbookplus.com

If curious, you can see the app using
the "CookBookPlusOnTheWeb" link on the home page.

Or use
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb. aspx for a direct link.

The app is hosted on a Windows Server 2003 system so
whatever we do must work with IIS 6 when we deploy.

Thank you.
Bob Jones
bo******@toad.net
bo*@cookbookplus.com
4106267564


.



"mail.yourSMTPDomainNameHere.com"
"smtp.yourSMTPDomainNameHere.com"

or try blank ""

"Bob Jones" <bo******@toad.net> wrote in message
news:0a****************************@phx.gbl...

We have developed a commercial ASP.net application
(personal nutrition management and tracking); we want to
send smtp email from within it.

For our development box, we use WinXP Pro, IIS 5.5,
VisualStudio2002, VB as programing language. Our
test/development version of the web app as hosted on
our "localhost" works fine; our "Default SMTP Virtual
Server" is running (per the IIS console).

Our simple test page (EmailTest.aspx)is in a separate
project, has only a single button and we are trying to
use the following code on the EmailTest.aspx.vb:

Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click

Dim OK As New Mail.MailMessage()
OK.From = "bo******@toad.net"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "bo*@cookbookplus.com"
Mail.SmtpMail.SmtpServer = "localhost"

Mail.SmtpMail.Send(OK)

End Sub

The line Mail.SmtpMail.Send(OK) always throws an
exception; we always get this error:

The server rejected one or more recipient addresses. The
server response was: 550 5.7.1 Unable to relay for
bo*@cookbookplus.com.com .

It does not matter who the recipient is, either. We are
connected to the internet via DSL. Otherwise, everything
else related to our stuff seems to work perfectly.

Have spent way too many man hours researching help files,
MSDN KnowledgeBase, etc. No luck. I am sure we are
doing soming wrong, but have no idea what.

Our only prior experience with email code has been with
MS Access using VBA. We know this is our mistake, just do
not know how to help ourselves. Also, the web app is our
first try using ASP.net, etc. Generally, the app works
works great!

Can anyone please help; or provide a good example we can
follow?

FYI, our web site is http://www.cookbookplus.com

If curious, you can see the app using
the "CookBookPlusOnTheWeb" link on the home page.

Or use
http://www.cookbookplus.com/CookBook...heWeb/LogInWeb.
aspx for a direct link.

The app is hosted on a Windows Server 2003 system so
whatever we do must work with IIS 6 when we deploy.

Thank you.
Bob Jones
bo******@toad.net
bo*@cookbookplus.com
4106267564



这篇关于无法使用SMTP发送电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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