B
Bob Jones
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 = "(e-mail address removed)"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "(e-mail address removed)"
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
(e-mail address removed) .
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/CookBookPlusOnTheWeb/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
(e-mail address removed)
(e-mail address removed)
4106267564
(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 = "(e-mail address removed)"
OK.Subject = "Test"
OK.Body = "Trying To Send Email"
OK.To = "(e-mail address removed)"
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
(e-mail address removed) .
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/CookBookPlusOnTheWeb/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
(e-mail address removed)
(e-mail address removed)
4106267564