By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,281 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

Cannot send email using SMTP

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
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

Nov 17 '05 #2

P: n/a
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

.

Nov 17 '05 #3

P: n/a
"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

Nov 17 '05 #4

P: n/a
check every folder in your \inetpub\mailroot directory.
Is the message getting stuck there?
"Bob Jones" <bo******@toad.net> wrote in message
news:03****************************@phx.gbl...
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 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

.

Nov 17 '05 #5

P: n/a
From: in**@YourSMTPDomainName.com or .net or .xxx

"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

Nov 17 '05 #6

P: n/a
Using "" generates this error: The "SendUsing"
configuration value is invalid.

Using anything other than "localhost" will generate the
failed to connect...error msg

Thanks for trying; still at a loss.

Bob
-----Original Message-----
"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

.

Nov 17 '05 #7

P: n/a
Hi Michal,

You are a genius!

Got it to work. FINALLY

Life is beautiful again...

Is this information written down anywhere I could have
located it.

Thank you very much.

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

Your SMTP server is configured not to allow relaying messages, which isdefault setting on IIS6.

Go to the SMTP virtualserver properties and allow relay for IP address127.0.0.1 (localhost) and all other IPs you want to be able to relay (ie.local network, if any).

--
Michal A. Valasek, Altair Communications, http://www.altaircom.netPlease do not reply to this e-mail, for contact see http://www.rider.cz

.

Nov 17 '05 #8

P: n/a
George,

Got it working

See thread from Michal

Thanks again for your help.

Bob
-----Original Message-----
check every folder in your \inetpub\mailroot directory.
Is the message getting stuck there?
"Bob Jones" <bo******@toad.net> wrote in message
news:03****************************@phx.gbl...
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 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
>>
>
>
>.
>

.

Nov 17 '05 #9

P: n/a
Got it working!!

See thread from Michal

Thanks again for assisting.

Bob
-----Original Message-----
"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

.

Nov 17 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.