Cannot send email using SMTP

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Cannot send email using SMTP

    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 = "bobjones@toad.net"
    OK.Subject = "Test"
    OK.Body = "Trying To Send Email"
    OK.To = "bob@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
    [email]bob@cookbookplus.com.com[/email] .

    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 [url]http://www.cookbookplus.com[/url]

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

    Or use
    [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    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
    [email]bobjones@toad.net[/email]
    [email]bob@cookbookplus.com[/email]
    4106267564

    Bob Jones Guest

  2. Similar Questions and Discussions

    1. SMTP email
      I am trying to do a basic email with coldfusion. I set up my mail server (mail.mywebite.com) and it says that it connects successfully. When I test...
    2. Send mail through a secure (SSL) SMTP server.
      Hi, I need to write a perl script that sends mail via a secure SMTP server. I've tried using Mail::SendEasy, but I don't think it supports SSL....
    3. #25142 [Fbk->Opn]: IIS 6.0 SMTP server and mail function can't send over ~120K
      ID: 25142 User updated by: sadun at isikun dot edu dot tr Reported By: sadun at isikun dot edu dot tr -Status: ...
    4. #25142 [NEW]: IIS 6.0 SMTP server and mail function can't send over ~120K
      From: sadun at isikun dot edu dot tr Operating system: Windows Server 2003 PHP version: 4.3.3RC4 PHP Bug Type: IIS related...
    5. Mac OS X EMail SMTP Setting
      Hey guys, I have a Mac OS X and use the Email program that came with the computer. I recently moved from Florida and removed my old Pop account...
  3. #2

    Default Re: Cannot send email using SMTP

    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" <bobjones@toad.net> wrote in message
    news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    > OK.Subject = "Test"
    > OK.Body = "Trying To Send Email"
    > OK.To = "bob@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
    > [email]bob@cookbookplus.com.com[/email] .
    >
    > 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 [url]http://www.cookbookplus.com[/url]
    >
    > If curious, you can see the app using
    > the "CookBookPlusOnTheWeb" link on the home page.
    >
    > Or use
    > [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    > 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
    > [email]bobjones@toad.net[/email]
    > [email]bob@cookbookplus.com[/email]
    > 4106267564
    >

    George Durzi Guest

  4. #3

    Default Re: Cannot send email using SMTP

    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" <bobjones@toad.net> wrote in message
    >news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    >> OK.Subject = "Test"
    >> OK.Body = "Trying To Send Email"
    >> OK.To = "bob@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
    >> [email]bob@cookbookplus.com.com[/email] .
    >>
    >> 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 [url]http://www.cookbookplus.com[/url]
    >>
    >> If curious, you can see the app using
    >> the "CookBookPlusOnTheWeb" link on the home page.
    >>
    >> Or use
    >>
    [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    >> 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
    >> [email]bobjones@toad.net[/email]
    >> [email]bob@cookbookplus.com[/email]
    >> 4106267564
    >>
    >
    >
    >.
    >
    Bob Jones Guest

  5. #4

    Default Re: Cannot send email using SMTP

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

    or try blank ""

    "Bob Jones" <bobjones@toad.net> wrote in message
    news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    > OK.Subject = "Test"
    > OK.Body = "Trying To Send Email"
    > OK.To = "bob@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
    > [email]bob@cookbookplus.com.com[/email] .
    >
    > 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 [url]http://www.cookbookplus.com[/url]
    >
    > If curious, you can see the app using
    > the "CookBookPlusOnTheWeb" link on the home page.
    >
    > Or use
    > [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    > 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
    > [email]bobjones@toad.net[/email]
    > [email]bob@cookbookplus.com[/email]
    > 4106267564
    >

    MS News \(MS LVP\) Guest

  6. #5

    Default Re: Cannot send email using SMTP

    check every folder in your \inetpub\mailroot directory.
    Is the message getting stuck there?


    "Bob Jones" <bobjones@toad.net> wrote in message
    news:032b01c35d30$1cebba90$a601280a@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" <bobjones@toad.net> wrote in message
    > >news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    > >> OK.Subject = "Test"
    > >> OK.Body = "Trying To Send Email"
    > >> OK.To = "bob@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
    > >> [email]bob@cookbookplus.com.com[/email] .
    > >>
    > >> 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 [url]http://www.cookbookplus.com[/url]
    > >>
    > >> If curious, you can see the app using
    > >> the "CookBookPlusOnTheWeb" link on the home page.
    > >>
    > >> Or use
    > >>
    > [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    > >> 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
    > >> [email]bobjones@toad.net[/email]
    > >> [email]bob@cookbookplus.com[/email]
    > >> 4106267564
    > >>
    > >
    > >
    > >.
    > >

    George Durzi Guest

  7. #6

    Default Re: Cannot send email using SMTP

    From: [email]info@YourSMTPDomainName.com[/email] or .net or .xxx

    "Bob Jones" <bobjones@toad.net> wrote in message
    news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    > OK.Subject = "Test"
    > OK.Body = "Trying To Send Email"
    > OK.To = "bob@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
    > [email]bob@cookbookplus.com.com[/email] .
    >
    > 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 [url]http://www.cookbookplus.com[/url]
    >
    > If curious, you can see the app using
    > the "CookBookPlusOnTheWeb" link on the home page.
    >
    > Or use
    > [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    > 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
    > [email]bobjones@toad.net[/email]
    > [email]bob@cookbookplus.com[/email]
    > 4106267564
    >

    MS News \(MS LVP\) Guest

  8. #7

    Default Re: Cannot send email using SMTP

    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" <bobjones@toad.net> wrote in message
    >news:0aee01c35d2b$ef6de740$a001280a@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 = "bobjones@toad.net"
    >> OK.Subject = "Test"
    >> OK.Body = "Trying To Send Email"
    >> OK.To = "bob@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
    >> [email]bob@cookbookplus.com.com[/email] .
    >>
    >> 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 [url]http://www.cookbookplus.com[/url]
    >>
    >> If curious, you can see the app using
    >> the "CookBookPlusOnTheWeb" link on the home page.
    >>
    >> Or use
    >>
    [url]http://www.cookbookplus.com/CookBookPlusOnTheWeb/LogInWeb[/url].
    >> 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
    >> [email]bobjones@toad.net[/email]
    >> [email]bob@cookbookplus.com[/email]
    >> 4106267564
    >>
    >
    >
    >.
    >
    Bob Jones Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139