Email not working

Discussion in 'ASP .Net' started by tshad, Feb 7, 2005.

  1. tshad

    tshad Guest

    I have a W2003 server running my website and I am trying to set up my pages
    to send email using System.Web.Mail.

    I have pages running on this machine using CDONTS that work fine.

    I am using our exchange server to send the mail but am getting an "Unable to
    relay" message. But the "From" name is my email address, which is obviously
    on our exchange server, so there is no relay.

    The message I get back is:

    "The server rejected one or more recipient addresses. The server response
    was: 550 5.7.1 Unable to relay for "

    My trace is showing:

    "Could not access 'CDO.Message' object.
    at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
    methodName, Object[] args)
    at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    at System.Web.Mail.SmtpMail.Send(MailMessage message)
    at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain()"

    Am I missing something here?

    The is my personal email.

    Thanks,

    Tom
    tshad, Feb 7, 2005
    #1
    1. Advertising

  2. tshad

    tshad Guest

    Sorry,

    I forgot to add the code:

    *************************************************
    <%@ Page Language="VB" trace="true" debug="true" ContentType="text/html"
    ResponseEncoding="iso-8859-1" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%@ Import Namespace="System.Web.Mail" %>

    <html>
    <script runat="server">
    Sub Page_Load(sender as Object, e as EventArgs)
    Dim Message As New MailMessage()
    message.To = ""
    message.From = ""
    message.Subject = "This is a test"
    message.Body = "This is the body"
    message.BodyFormat = MailFormat.Html
    SmtpMail.SmtpServer = "email.ftsolutions.com"
    smtpMail.Send(message)
    End Sub
    </script>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Submit Resume</title>
    </head>
    <link href="staffing.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    </body>
    </html>
    ************************************************************

    Thanks,

    Tom
    "tshad" <> wrote in message
    news:u1%...
    >I have a W2003 server running my website and I am trying to set up my pages
    >to send email using System.Web.Mail.
    >
    > I have pages running on this machine using CDONTS that work fine.
    >
    > I am using our exchange server to send the mail but am getting an "Unable
    > to relay" message. But the "From" name is my email address, which is
    > obviously on our exchange server, so there is no relay.
    >
    > The message I get back is:
    >
    > "The server rejected one or more recipient addresses. The server response
    > was: 550 5.7.1 Unable to relay for "
    >
    > My trace is showing:
    >
    > "Could not access 'CDO.Message' object.
    > at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
    > methodName, Object[] args)
    > at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    > at System.Web.Mail.SmtpMail.Send(MailMessage message)
    > at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    > C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    > at System.Web.UI.Control.OnLoad(EventArgs e)
    > at System.Web.UI.Control.LoadRecursive()
    > at System.Web.UI.Page.ProcessRequestMain()"
    >
    > Am I missing something here?
    >
    > The is my personal email.
    >
    > Thanks,
    >
    > Tom
    >
    tshad, Feb 7, 2005
    #2
    1. Advertising

  3. Exchange, by default, only relays from the domain it sits on. There are two
    options:

    1. Allow your domain (yahoo.com) to be added.
    2. Allow all relays from the IP address of the web server (better option,
    for security).


    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************


    "tshad" wrote:

    > I have a W2003 server running my website and I am trying to set up my pages
    > to send email using System.Web.Mail.
    >
    > I have pages running on this machine using CDONTS that work fine.
    >
    > I am using our exchange server to send the mail but am getting an "Unable to
    > relay" message. But the "From" name is my email address, which is obviously
    > on our exchange server, so there is no relay.
    >
    > The message I get back is:
    >
    > "The server rejected one or more recipient addresses. The server response
    > was: 550 5.7.1 Unable to relay for "
    >
    > My trace is showing:
    >
    > "Could not access 'CDO.Message' object.
    > at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
    > methodName, Object[] args)
    > at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    > at System.Web.Mail.SmtpMail.Send(MailMessage message)
    > at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    > C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    > at System.Web.UI.Control.OnLoad(EventArgs e)
    > at System.Web.UI.Control.LoadRecursive()
    > at System.Web.UI.Page.ProcessRequestMain()"
    >
    > Am I missing something here?
    >
    > The is my personal email.
    >
    > Thanks,
    >
    > Tom
    >
    >
    >
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Feb 7, 2005
    #3
  4. tshad

    tshad Guest

    "Cowboy (Gregory A. Beamer) - MVP" <> wrote
    in message news:...
    > Exchange, by default, only relays from the domain it sits on. There are
    > two
    > options:
    >
    > 1. Allow your domain (yahoo.com) to be added.
    > 2. Allow all relays from the IP address of the web server (better option,
    > for security).


    But why is CDONTS working?

    Is it being sent from the Windows 2003 server instead of the Exchange
    Server?

    If this is the case, how do I tell System.Web.Mail to send it the same way?

    Which would be better?

    Thanks,

    Tom

    >
    >
    > ---
    >
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ***************************
    > Think Outside the Box!
    > ***************************
    >
    >
    > "tshad" wrote:
    >
    >> I have a W2003 server running my website and I am trying to set up my
    >> pages
    >> to send email using System.Web.Mail.
    >>
    >> I have pages running on this machine using CDONTS that work fine.
    >>
    >> I am using our exchange server to send the mail but am getting an "Unable
    >> to
    >> relay" message. But the "From" name is my email address, which is
    >> obviously
    >> on our exchange server, so there is no relay.
    >>
    >> The message I get back is:
    >>
    >> "The server rejected one or more recipient addresses. The server response
    >> was: 550 5.7.1 Unable to relay for "
    >>
    >> My trace is showing:
    >>
    >> "Could not access 'CDO.Message' object.
    >> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
    >> methodName, Object[] args)
    >> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    >> at System.Web.UI.Control.OnLoad(EventArgs e)
    >> at System.Web.UI.Control.LoadRecursive()
    >> at System.Web.UI.Page.ProcessRequestMain()"
    >>
    >> Am I missing something here?
    >>
    >> The is my personal email.
    >>
    >> Thanks,
    >>
    >> Tom
    >>
    >>
    >>
    tshad, Feb 7, 2005
    #4
  5. You could setup an smtp service in your W2K3 Server,
    and use *that* to forward your emails, instead of
    using your Exchange Server to relay the emails.

    It's pretty straightforward...and works like a charm.



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    =====================

    "tshad" <> wrote in message
    news:eqYc$%...
    > "Cowboy (Gregory A. Beamer) - MVP" <>
    > wrote in message
    > news:...
    >> Exchange, by default, only relays from the domain it sits on. There are
    >> two
    >> options:
    >>
    >> 1. Allow your domain (yahoo.com) to be added.
    >> 2. Allow all relays from the IP address of the web server (better option,
    >> for security).

    >
    > But why is CDONTS working?
    >
    > Is it being sent from the Windows 2003 server instead of the Exchange
    > Server?
    >
    > If this is the case, how do I tell System.Web.Mail to send it the same
    > way?
    >
    > Which would be better?
    >
    > Thanks,
    >
    > Tom
    >
    >>
    >>
    >> ---
    >>
    >> Gregory A. Beamer
    >> MVP; MCP: +I, SE, SD, DBA
    >>
    >> ***************************
    >> Think Outside the Box!
    >> ***************************
    >>
    >>
    >> "tshad" wrote:
    >>
    >>> I have a W2003 server running my website and I am trying to set up my
    >>> pages
    >>> to send email using System.Web.Mail.
    >>>
    >>> I have pages running on this machine using CDONTS that work fine.
    >>>
    >>> I am using our exchange server to send the mail but am getting an
    >>> "Unable to
    >>> relay" message. But the "From" name is my email address, which is
    >>> obviously
    >>> on our exchange server, so there is no relay.
    >>>
    >>> The message I get back is:
    >>>
    >>> "The server rejected one or more recipient addresses. The server
    >>> response
    >>> was: 550 5.7.1 Unable to relay for "
    >>>
    >>> My trace is showing:
    >>>
    >>> "Could not access 'CDO.Message' object.
    >>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String
    >>> methodName, Object[] args)
    >>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    >>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>> at System.Web.UI.Control.LoadRecursive()
    >>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>
    >>> Am I missing something here?
    >>>
    >>> The is my personal email.
    >>>
    >>> Thanks,
    >>>
    >>> Tom
    >>>
    >>>
    >>>

    >
    >
    Juan T. Llibre, Feb 7, 2005
    #5
  6. tshad

    tshad Guest

    "Juan T. Llibre" <> wrote in message
    news:...
    > You could setup an smtp service in your W2K3 Server,
    > and use *that* to forward your emails, instead of
    > using your Exchange Server to relay the emails.
    >
    > It's pretty straightforward...and works like a charm.


    If CDONTS is working, would it already be doing that?

    Also, what would I put in my SmtpMail.SmtpServer field?

    Thanks,

    Tom
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > =====================
    >
    > "tshad" <> wrote in message
    > news:eqYc$%...
    >> "Cowboy (Gregory A. Beamer) - MVP" <>
    >> wrote in message
    >> news:...
    >>> Exchange, by default, only relays from the domain it sits on. There are
    >>> two
    >>> options:
    >>>
    >>> 1. Allow your domain (yahoo.com) to be added.
    >>> 2. Allow all relays from the IP address of the web server (better
    >>> option,
    >>> for security).

    >>
    >> But why is CDONTS working?
    >>
    >> Is it being sent from the Windows 2003 server instead of the Exchange
    >> Server?
    >>
    >> If this is the case, how do I tell System.Web.Mail to send it the same
    >> way?
    >>
    >> Which would be better?
    >>
    >> Thanks,
    >>
    >> Tom
    >>
    >>>
    >>>
    >>> ---
    >>>
    >>> Gregory A. Beamer
    >>> MVP; MCP: +I, SE, SD, DBA
    >>>
    >>> ***************************
    >>> Think Outside the Box!
    >>> ***************************
    >>>
    >>>
    >>> "tshad" wrote:
    >>>
    >>>> I have a W2003 server running my website and I am trying to set up my
    >>>> pages
    >>>> to send email using System.Web.Mail.
    >>>>
    >>>> I have pages running on this machine using CDONTS that work fine.
    >>>>
    >>>> I am using our exchange server to send the mail but am getting an
    >>>> "Unable to
    >>>> relay" message. But the "From" name is my email address, which is
    >>>> obviously
    >>>> on our exchange server, so there is no relay.
    >>>>
    >>>> The message I get back is:
    >>>>
    >>>> "The server rejected one or more recipient addresses. The server
    >>>> response
    >>>> was: 550 5.7.1 Unable to relay for "
    >>>>
    >>>> My trace is showing:
    >>>>
    >>>> "Could not access 'CDO.Message' object.
    >>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>> String
    >>>> methodName, Object[] args)
    >>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    >>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>> at System.Web.UI.Control.LoadRecursive()
    >>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>
    >>>> Am I missing something here?
    >>>>
    >>>> The is my personal email.
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom
    >>>>
    >>>>
    >>>>

    >>
    >>

    >
    >
    tshad, Feb 7, 2005
    #6
  7. tshad

    tshad Guest

    "tshad" <> wrote in message
    news:...
    > "Juan T. Llibre" <> wrote in message
    > news:...
    >> You could setup an smtp service in your W2K3 Server,
    >> and use *that* to forward your emails, instead of
    >> using your Exchange Server to relay the emails.
    >>
    >> It's pretty straightforward...and works like a charm.

    >
    > If CDONTS is working, would it already be doing that?
    >
    > Also, what would I put in my SmtpMail.SmtpServer field?


    I tried setting it to:

    SmtpMail.SmtpServer = "127.0.0.1"

    But that didn't work.

    Tom
    >
    > Thanks,
    >
    > Tom
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> =====================
    >>
    >> "tshad" <> wrote in message
    >> news:eqYc$%...
    >>> "Cowboy (Gregory A. Beamer) - MVP" <>
    >>> wrote in message
    >>> news:...
    >>>> Exchange, by default, only relays from the domain it sits on. There are
    >>>> two
    >>>> options:
    >>>>
    >>>> 1. Allow your domain (yahoo.com) to be added.
    >>>> 2. Allow all relays from the IP address of the web server (better
    >>>> option,
    >>>> for security).
    >>>
    >>> But why is CDONTS working?
    >>>
    >>> Is it being sent from the Windows 2003 server instead of the Exchange
    >>> Server?
    >>>
    >>> If this is the case, how do I tell System.Web.Mail to send it the same
    >>> way?
    >>>
    >>> Which would be better?
    >>>
    >>> Thanks,
    >>>
    >>> Tom
    >>>
    >>>>
    >>>>
    >>>> ---
    >>>>
    >>>> Gregory A. Beamer
    >>>> MVP; MCP: +I, SE, SD, DBA
    >>>>
    >>>> ***************************
    >>>> Think Outside the Box!
    >>>> ***************************
    >>>>
    >>>>
    >>>> "tshad" wrote:
    >>>>
    >>>>> I have a W2003 server running my website and I am trying to set up my
    >>>>> pages
    >>>>> to send email using System.Web.Mail.
    >>>>>
    >>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>
    >>>>> I am using our exchange server to send the mail but am getting an
    >>>>> "Unable to
    >>>>> relay" message. But the "From" name is my email address, which is
    >>>>> obviously
    >>>>> on our exchange server, so there is no relay.
    >>>>>
    >>>>> The message I get back is:
    >>>>>
    >>>>> "The server rejected one or more recipient addresses. The server
    >>>>> response
    >>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>
    >>>>> My trace is showing:
    >>>>>
    >>>>> "Could not access 'CDO.Message' object.
    >>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>> String
    >>>>> methodName, Object[] args)
    >>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    >>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>
    >>>>> Am I missing something here?
    >>>>>
    >>>>> The is my personal email.
    >>>>>
    >>>>> Thanks,
    >>>>>
    >>>>> Tom
    >>>>>
    >>>>>
    >>>>>
    >>>
    >>>

    >>
    >>

    >
    >
    tshad, Feb 7, 2005
    #7
  8. re:
    > I tried setting it to:
    > SmtpMail.SmtpServer = "127.0.0.1"
    > But that didn't work.


    Did you set up the smtp server service ?
    If you didn't, that can't work.

    I set up an smtp service, and assigned it the same
    name as my domain name, and it works all the time.

    Click your Start button, hit the "Help and Support" link,
    and search for "install smtp service" when the Help and
    Support Center opens.

    When the search ends, You should see several links
    with the information you need to setup the smtp service.

    Follow the instructions...

    Hint: you don't actually need to run the POP3
    service, although if you want to, you certainly can.

    What I did is that, after installing the POP3 and SMTP services,
    since I didn't want to run a full mail server, I uninstalled the
    POP3 service, *but left the SMTP service running*.

    Let us know if you run into trouble doing that.




    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    =====================

    "tshad" <> wrote in message
    news:...
    > "tshad" <> wrote in message
    > news:...
    >> "Juan T. Llibre" <> wrote in message
    >> news:...
    >>> You could setup an smtp service in your W2K3 Server,
    >>> and use *that* to forward your emails, instead of
    >>> using your Exchange Server to relay the emails.
    >>>
    >>> It's pretty straightforward...and works like a charm.

    >>
    >> If CDONTS is working, would it already be doing that?
    >>
    >> Also, what would I put in my SmtpMail.SmtpServer field?

    >
    > I tried setting it to:
    >
    > SmtpMail.SmtpServer = "127.0.0.1"
    >
    > But that didn't work.
    >
    > Tom
    >>
    >> Thanks,
    >>
    >> Tom
    >>>
    >>>
    >>>
    >>> Juan T. Llibre
    >>> ASP.NET MVP
    >>> http://asp.net.do/foros/
    >>> Foros de ASP.NET en Español
    >>> =====================
    >>>
    >>> "tshad" <> wrote in message
    >>> news:eqYc$%...
    >>>> "Cowboy (Gregory A. Beamer) - MVP" <>
    >>>> wrote in message
    >>>> news:...
    >>>>> Exchange, by default, only relays from the domain it sits on. There
    >>>>> are two
    >>>>> options:
    >>>>>
    >>>>> 1. Allow your domain (yahoo.com) to be added.
    >>>>> 2. Allow all relays from the IP address of the web server (better
    >>>>> option,
    >>>>> for security).
    >>>>
    >>>> But why is CDONTS working?
    >>>>
    >>>> Is it being sent from the Windows 2003 server instead of the Exchange
    >>>> Server?
    >>>>
    >>>> If this is the case, how do I tell System.Web.Mail to send it the same
    >>>> way?
    >>>>
    >>>> Which would be better?
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom
    >>>>
    >>>>>
    >>>>>
    >>>>> ---
    >>>>>
    >>>>> Gregory A. Beamer
    >>>>> MVP; MCP: +I, SE, SD, DBA
    >>>>>
    >>>>> ***************************
    >>>>> Think Outside the Box!
    >>>>> ***************************
    >>>>>
    >>>>>
    >>>>> "tshad" wrote:
    >>>>>
    >>>>>> I have a W2003 server running my website and I am trying to set up my
    >>>>>> pages
    >>>>>> to send email using System.Web.Mail.
    >>>>>>
    >>>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>>
    >>>>>> I am using our exchange server to send the mail but am getting an
    >>>>>> "Unable to
    >>>>>> relay" message. But the "From" name is my email address, which is
    >>>>>> obviously
    >>>>>> on our exchange server, so there is no relay.
    >>>>>>
    >>>>>> The message I get back is:
    >>>>>>
    >>>>>> "The server rejected one or more recipient addresses. The server
    >>>>>> response
    >>>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>>
    >>>>>> My trace is showing:
    >>>>>>
    >>>>>> "Could not access 'CDO.Message' object.
    >>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>>> String
    >>>>>> methodName, Object[] args)
    >>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line 15
    >>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>>
    >>>>>> Am I missing something here?
    >>>>>>
    >>>>>> The is my personal email.
    >>>>>>
    >>>>>> Thanks,
    >>>>>>
    >>>>>> Tom
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Juan T. Llibre, Feb 7, 2005
    #8
  9. tshad

    tshad Guest

    "Juan T. Llibre" <> wrote in message
    news:...
    > re:
    >> I tried setting it to:
    >> SmtpMail.SmtpServer = "127.0.0.1"
    >> But that didn't work.

    >
    > Did you set up the smtp server service ?
    > If you didn't, that can't work.


    I looked and it was already set up and running.

    It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

    It was logged on as a Local System Account.

    >
    > I set up an smtp service, and assigned it the same
    > name as my domain name, and it works all the time.
    >
    > Click your Start button, hit the "Help and Support" link,
    > and search for "install smtp service" when the Help and
    > Support Center opens.
    >
    > When the search ends, You should see several links
    > with the information you need to setup the smtp service.
    >
    > Follow the instructions...
    >
    > Hint: you don't actually need to run the POP3
    > service, although if you want to, you certainly can.


    I don't need need POP3, I only need to be able to send from my Web Server.

    >
    > What I did is that, after installing the POP3 and SMTP services,
    > since I didn't want to run a full mail server, I uninstalled the
    > POP3 service, *but left the SMTP service running*.
    >
    > Let us know if you run into trouble doing that.


    It still doesn't work. I don't want to change the name as I don't know how
    that would affect the other programs using CDONTS.

    Tom
    >
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > =====================
    >
    > "tshad" <> wrote in message
    > news:...
    >> "tshad" <> wrote in message
    >> news:...
    >>> "Juan T. Llibre" <> wrote in message
    >>> news:...
    >>>> You could setup an smtp service in your W2K3 Server,
    >>>> and use *that* to forward your emails, instead of
    >>>> using your Exchange Server to relay the emails.
    >>>>
    >>>> It's pretty straightforward...and works like a charm.
    >>>
    >>> If CDONTS is working, would it already be doing that?
    >>>
    >>> Also, what would I put in my SmtpMail.SmtpServer field?

    >>
    >> I tried setting it to:
    >>
    >> SmtpMail.SmtpServer = "127.0.0.1"
    >>
    >> But that didn't work.
    >>
    >> Tom
    >>>
    >>> Thanks,
    >>>
    >>> Tom
    >>>>
    >>>>
    >>>>
    >>>> Juan T. Llibre
    >>>> ASP.NET MVP
    >>>> http://asp.net.do/foros/
    >>>> Foros de ASP.NET en Español
    >>>> =====================
    >>>>
    >>>> "tshad" <> wrote in message
    >>>> news:eqYc$%...
    >>>>> "Cowboy (Gregory A. Beamer) - MVP" <>
    >>>>> wrote in message
    >>>>> news:...
    >>>>>> Exchange, by default, only relays from the domain it sits on. There
    >>>>>> are two
    >>>>>> options:
    >>>>>>
    >>>>>> 1. Allow your domain (yahoo.com) to be added.
    >>>>>> 2. Allow all relays from the IP address of the web server (better
    >>>>>> option,
    >>>>>> for security).
    >>>>>
    >>>>> But why is CDONTS working?
    >>>>>
    >>>>> Is it being sent from the Windows 2003 server instead of the Exchange
    >>>>> Server?
    >>>>>
    >>>>> If this is the case, how do I tell System.Web.Mail to send it the same
    >>>>> way?
    >>>>>
    >>>>> Which would be better?
    >>>>>
    >>>>> Thanks,
    >>>>>
    >>>>> Tom
    >>>>>
    >>>>>>
    >>>>>>
    >>>>>> ---
    >>>>>>
    >>>>>> Gregory A. Beamer
    >>>>>> MVP; MCP: +I, SE, SD, DBA
    >>>>>>
    >>>>>> ***************************
    >>>>>> Think Outside the Box!
    >>>>>> ***************************
    >>>>>>
    >>>>>>
    >>>>>> "tshad" wrote:
    >>>>>>
    >>>>>>> I have a W2003 server running my website and I am trying to set up
    >>>>>>> my pages
    >>>>>>> to send email using System.Web.Mail.
    >>>>>>>
    >>>>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>>>
    >>>>>>> I am using our exchange server to send the mail but am getting an
    >>>>>>> "Unable to
    >>>>>>> relay" message. But the "From" name is my email address, which is
    >>>>>>> obviously
    >>>>>>> on our exchange server, so there is no relay.
    >>>>>>>
    >>>>>>> The message I get back is:
    >>>>>>>
    >>>>>>> "The server rejected one or more recipient addresses. The server
    >>>>>>> response
    >>>>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>>>
    >>>>>>> My trace is showing:
    >>>>>>>
    >>>>>>> "Could not access 'CDO.Message' object.
    >>>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>>>> String
    >>>>>>> methodName, Object[] args)
    >>>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line
    >>>>>>> 15
    >>>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>>>
    >>>>>>> Am I missing something here?
    >>>>>>>
    >>>>>>> The is my personal email.
    >>>>>>>
    >>>>>>> Thanks,
    >>>>>>>
    >>>>>>> Tom
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    tshad, Feb 7, 2005
    #9
  10. re:
    > I looked and it was already set up and running.
    > It was set up with the name "Simple Mail Transfer Protocol (SMTP)".


    Good! You're halfway there!

    re:
    > SmtpMail.SmtpServer = "127.0.0.1"


    Try using "localhost", instead of "127.0.0.1"

    Also, you could try to use the default domain name
    for the smtp server ( Open the smtp server's properties
    in the IIS MMC, and see what the default domain name is.
    Then, use *that* name, instead of "127.0.0.1" or "localhost")

    Warning: some mail servers reject single-name smtp server
    aliases. They only accept full domain names ( domainname.com ).

    Do you have a registered domain name for your server ?

    If you do, just create a new smtp domain,
    and assign it your domain name.

    Not to worry, there won't be a name conflict.

    re:
    > It still doesn't work. I don't want to change the name as I don't know
    > how that would affect the other programs using CDONTS.


    You don't have to change the name of the existing smtp server.

    You can create as many aliases as you want to.
    Open the IIS MMC, select the default smtp server,
    expand the tree, select "Domain", right-click "Domains",
    and select "New" --> Domain.

    Then configure it as you see fit.

    The current domain will continue to work as usual.





    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    =====================

    "tshad" <> wrote in message
    news:uoOa$...
    > "Juan T. Llibre" <> wrote in message
    > news:...
    >> re:
    >>> I tried setting it to:
    >>> SmtpMail.SmtpServer = "127.0.0.1"
    >>> But that didn't work.

    >>
    >> Did you set up the smtp server service ?
    >> If you didn't, that can't work.

    >
    > I looked and it was already set up and running.
    >
    > It was set up with the name "Simple Mail Transfer Protocol (SMTP)".
    >
    > It was logged on as a Local System Account.
    >
    >>
    >> I set up an smtp service, and assigned it the same
    >> name as my domain name, and it works all the time.
    >>
    >> Click your Start button, hit the "Help and Support" link,
    >> and search for "install smtp service" when the Help and
    >> Support Center opens.
    >>
    >> When the search ends, You should see several links
    >> with the information you need to setup the smtp service.
    >>
    >> Follow the instructions...
    >>
    >> Hint: you don't actually need to run the POP3
    >> service, although if you want to, you certainly can.

    >
    > I don't need need POP3, I only need to be able to send from my Web Server.
    >
    >>
    >> What I did is that, after installing the POP3 and SMTP services,
    >> since I didn't want to run a full mail server, I uninstalled the
    >> POP3 service, *but left the SMTP service running*.
    >>
    >> Let us know if you run into trouble doing that.

    >
    > It still doesn't work. I don't want to change the name as I don't know
    > how that would affect the other programs using CDONTS.
    >
    > Tom
    >>
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> =====================
    >>
    >> "tshad" <> wrote in message
    >> news:...
    >>> "tshad" <> wrote in message
    >>> news:...
    >>>> "Juan T. Llibre" <> wrote in message
    >>>> news:...
    >>>>> You could setup an smtp service in your W2K3 Server,
    >>>>> and use *that* to forward your emails, instead of
    >>>>> using your Exchange Server to relay the emails.
    >>>>>
    >>>>> It's pretty straightforward...and works like a charm.
    >>>>
    >>>> If CDONTS is working, would it already be doing that?
    >>>>
    >>>> Also, what would I put in my SmtpMail.SmtpServer field?
    >>>
    >>> I tried setting it to:
    >>>
    >>> SmtpMail.SmtpServer = "127.0.0.1"
    >>>
    >>> But that didn't work.
    >>>
    >>> Tom
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom
    >>>>>
    >>>>>
    >>>>>
    >>>>> Juan T. Llibre
    >>>>> ASP.NET MVP
    >>>>> http://asp.net.do/foros/
    >>>>> Foros de ASP.NET en Español
    >>>>> =====================
    >>>>>
    >>>>> "tshad" <> wrote in message
    >>>>> news:eqYc$%...
    >>>>>> "Cowboy (Gregory A. Beamer) - MVP"
    >>>>>> <> wrote in message
    >>>>>> news:...
    >>>>>>> Exchange, by default, only relays from the domain it sits on. There
    >>>>>>> are two
    >>>>>>> options:
    >>>>>>>
    >>>>>>> 1. Allow your domain (yahoo.com) to be added.
    >>>>>>> 2. Allow all relays from the IP address of the web server (better
    >>>>>>> option,
    >>>>>>> for security).
    >>>>>>
    >>>>>> But why is CDONTS working?
    >>>>>>
    >>>>>> Is it being sent from the Windows 2003 server instead of the Exchange
    >>>>>> Server?
    >>>>>>
    >>>>>> If this is the case, how do I tell System.Web.Mail to send it the
    >>>>>> same way?
    >>>>>>
    >>>>>> Which would be better?
    >>>>>>
    >>>>>> Thanks,
    >>>>>>
    >>>>>> Tom
    >>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> ---
    >>>>>>>
    >>>>>>> Gregory A. Beamer
    >>>>>>> MVP; MCP: +I, SE, SD, DBA
    >>>>>>>
    >>>>>>> ***************************
    >>>>>>> Think Outside the Box!
    >>>>>>> ***************************
    >>>>>>>
    >>>>>>>
    >>>>>>> "tshad" wrote:
    >>>>>>>
    >>>>>>>> I have a W2003 server running my website and I am trying to set up
    >>>>>>>> my pages
    >>>>>>>> to send email using System.Web.Mail.
    >>>>>>>>
    >>>>>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>>>>
    >>>>>>>> I am using our exchange server to send the mail but am getting an
    >>>>>>>> "Unable to
    >>>>>>>> relay" message. But the "From" name is my email address, which is
    >>>>>>>> obviously
    >>>>>>>> on our exchange server, so there is no relay.
    >>>>>>>>
    >>>>>>>> The message I get back is:
    >>>>>>>>
    >>>>>>>> "The server rejected one or more recipient addresses. The server
    >>>>>>>> response
    >>>>>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>>>>
    >>>>>>>> My trace is showing:
    >>>>>>>>
    >>>>>>>> "Could not access 'CDO.Message' object.
    >>>>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>>>>> String
    >>>>>>>> methodName, Object[] args)
    >>>>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line
    >>>>>>>> 15
    >>>>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>>>>
    >>>>>>>> Am I missing something here?
    >>>>>>>>
    >>>>>>>> The is my personal email.
    >>>>>>>>
    >>>>>>>> Thanks,
    >>>>>>>>
    >>>>>>>> Tom
    >>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Juan T. Llibre, Feb 7, 2005
    #10
  11. tshad

    tshad Guest

    "Juan T. Llibre" <> wrote in message
    news:...
    > re:
    >> I looked and it was already set up and running.
    >> It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

    >
    > Good! You're halfway there!
    >
    > re:
    >> SmtpMail.SmtpServer = "127.0.0.1"

    >
    > Try using "localhost", instead of "127.0.0.1"


    That worked.

    Why didn't 127.0.0.1?

    Also, why didn't I have to do all this to get CDONTS to work?

    Thanks,

    Tom
    >
    > Also, you could try to use the default domain name
    > for the smtp server ( Open the smtp server's properties
    > in the IIS MMC, and see what the default domain name is.
    > Then, use *that* name, instead of "127.0.0.1" or "localhost")
    >
    > Warning: some mail servers reject single-name smtp server
    > aliases. They only accept full domain names ( domainname.com ).
    >
    > Do you have a registered domain name for your server ?
    >
    > If you do, just create a new smtp domain,
    > and assign it your domain name.
    >
    > Not to worry, there won't be a name conflict.
    >
    > re:
    >> It still doesn't work. I don't want to change the name as I don't know
    >> how that would affect the other programs using CDONTS.

    >
    > You don't have to change the name of the existing smtp server.
    >
    > You can create as many aliases as you want to.
    > Open the IIS MMC, select the default smtp server,
    > expand the tree, select "Domain", right-click "Domains",
    > and select "New" --> Domain.
    >
    > Then configure it as you see fit.
    >
    > The current domain will continue to work as usual.
    >
    >
    >
    >
    >
    > Juan T. Llibre
    > ASP.NET MVP
    > http://asp.net.do/foros/
    > Foros de ASP.NET en Español
    > =====================
    >
    > "tshad" <> wrote in message
    > news:uoOa$...
    >> "Juan T. Llibre" <> wrote in message
    >> news:...
    >>> re:
    >>>> I tried setting it to:
    >>>> SmtpMail.SmtpServer = "127.0.0.1"
    >>>> But that didn't work.
    >>>
    >>> Did you set up the smtp server service ?
    >>> If you didn't, that can't work.

    >>
    >> I looked and it was already set up and running.
    >>
    >> It was set up with the name "Simple Mail Transfer Protocol (SMTP)".
    >>
    >> It was logged on as a Local System Account.
    >>
    >>>
    >>> I set up an smtp service, and assigned it the same
    >>> name as my domain name, and it works all the time.
    >>>
    >>> Click your Start button, hit the "Help and Support" link,
    >>> and search for "install smtp service" when the Help and
    >>> Support Center opens.
    >>>
    >>> When the search ends, You should see several links
    >>> with the information you need to setup the smtp service.
    >>>
    >>> Follow the instructions...
    >>>
    >>> Hint: you don't actually need to run the POP3
    >>> service, although if you want to, you certainly can.

    >>
    >> I don't need need POP3, I only need to be able to send from my Web
    >> Server.
    >>
    >>>
    >>> What I did is that, after installing the POP3 and SMTP services,
    >>> since I didn't want to run a full mail server, I uninstalled the
    >>> POP3 service, *but left the SMTP service running*.
    >>>
    >>> Let us know if you run into trouble doing that.

    >>
    >> It still doesn't work. I don't want to change the name as I don't know
    >> how that would affect the other programs using CDONTS.
    >>
    >> Tom
    >>>
    >>>
    >>>
    >>>
    >>> Juan T. Llibre
    >>> ASP.NET MVP
    >>> http://asp.net.do/foros/
    >>> Foros de ASP.NET en Español
    >>> =====================
    >>>
    >>> "tshad" <> wrote in message
    >>> news:...
    >>>> "tshad" <> wrote in message
    >>>> news:...
    >>>>> "Juan T. Llibre" <> wrote in message
    >>>>> news:...
    >>>>>> You could setup an smtp service in your W2K3 Server,
    >>>>>> and use *that* to forward your emails, instead of
    >>>>>> using your Exchange Server to relay the emails.
    >>>>>>
    >>>>>> It's pretty straightforward...and works like a charm.
    >>>>>
    >>>>> If CDONTS is working, would it already be doing that?
    >>>>>
    >>>>> Also, what would I put in my SmtpMail.SmtpServer field?
    >>>>
    >>>> I tried setting it to:
    >>>>
    >>>> SmtpMail.SmtpServer = "127.0.0.1"
    >>>>
    >>>> But that didn't work.
    >>>>
    >>>> Tom
    >>>>>
    >>>>> Thanks,
    >>>>>
    >>>>> Tom
    >>>>>>
    >>>>>>
    >>>>>>
    >>>>>> Juan T. Llibre
    >>>>>> ASP.NET MVP
    >>>>>> http://asp.net.do/foros/
    >>>>>> Foros de ASP.NET en Español
    >>>>>> =====================
    >>>>>>
    >>>>>> "tshad" <> wrote in message
    >>>>>> news:eqYc$%...
    >>>>>>> "Cowboy (Gregory A. Beamer) - MVP"
    >>>>>>> <> wrote in message
    >>>>>>> news:...
    >>>>>>>> Exchange, by default, only relays from the domain it sits on. There
    >>>>>>>> are two
    >>>>>>>> options:
    >>>>>>>>
    >>>>>>>> 1. Allow your domain (yahoo.com) to be added.
    >>>>>>>> 2. Allow all relays from the IP address of the web server (better
    >>>>>>>> option,
    >>>>>>>> for security).
    >>>>>>>
    >>>>>>> But why is CDONTS working?
    >>>>>>>
    >>>>>>> Is it being sent from the Windows 2003 server instead of the
    >>>>>>> Exchange Server?
    >>>>>>>
    >>>>>>> If this is the case, how do I tell System.Web.Mail to send it the
    >>>>>>> same way?
    >>>>>>>
    >>>>>>> Which would be better?
    >>>>>>>
    >>>>>>> Thanks,
    >>>>>>>
    >>>>>>> Tom
    >>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> ---
    >>>>>>>>
    >>>>>>>> Gregory A. Beamer
    >>>>>>>> MVP; MCP: +I, SE, SD, DBA
    >>>>>>>>
    >>>>>>>> ***************************
    >>>>>>>> Think Outside the Box!
    >>>>>>>> ***************************
    >>>>>>>>
    >>>>>>>>
    >>>>>>>> "tshad" wrote:
    >>>>>>>>
    >>>>>>>>> I have a W2003 server running my website and I am trying to set up
    >>>>>>>>> my pages
    >>>>>>>>> to send email using System.Web.Mail.
    >>>>>>>>>
    >>>>>>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>>>>>
    >>>>>>>>> I am using our exchange server to send the mail but am getting an
    >>>>>>>>> "Unable to
    >>>>>>>>> relay" message. But the "From" name is my email address, which is
    >>>>>>>>> obviously
    >>>>>>>>> on our exchange server, so there is no relay.
    >>>>>>>>>
    >>>>>>>>> The message I get back is:
    >>>>>>>>>
    >>>>>>>>> "The server rejected one or more recipient addresses. The server
    >>>>>>>>> response
    >>>>>>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>>>>>
    >>>>>>>>> My trace is showing:
    >>>>>>>>>
    >>>>>>>>> "Could not access 'CDO.Message' object.
    >>>>>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>>>>>> String
    >>>>>>>>> methodName, Object[] args)
    >>>>>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line
    >>>>>>>>> 15
    >>>>>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>>>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>>>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>>>>>
    >>>>>>>>> Am I missing something here?
    >>>>>>>>>
    >>>>>>>>> The is my personal email.
    >>>>>>>>>
    >>>>>>>>> Thanks,
    >>>>>>>>>
    >>>>>>>>> Tom
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    tshad, Feb 8, 2005
    #11
  12. re:
    >> Try using "localhost", instead of "127.0.0.1"

    > That worked.


    Good! Glad to see you're up and running now!

    re:
    > Why didn't 127.0.0.1?


    No idea...

    On my server, neither "localhost" nor "127.0.0.1" work.
    I *have* to use my domain name...or it doesn't work.

    > Also, why didn't I have to do all this to get CDONTS to work?


    They want us to be on our toes ?

    ;-)






    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en Español
    =====================

    "tshad" <> wrote in message
    news:...
    > "Juan T. Llibre" <> wrote in message
    > news:...
    >> re:
    >>> I looked and it was already set up and running.
    >>> It was set up with the name "Simple Mail Transfer Protocol (SMTP)".

    >>
    >> Good! You're halfway there!
    >>
    >> re:
    >>> SmtpMail.SmtpServer = "127.0.0.1"

    >>
    >> Try using "localhost", instead of "127.0.0.1"

    >
    > That worked.
    >
    > Why didn't 127.0.0.1?
    >
    > Also, why didn't I have to do all this to get CDONTS to work?
    >
    > Thanks,
    >
    > Tom
    >>
    >> Also, you could try to use the default domain name
    >> for the smtp server ( Open the smtp server's properties
    >> in the IIS MMC, and see what the default domain name is.
    >> Then, use *that* name, instead of "127.0.0.1" or "localhost")
    >>
    >> Warning: some mail servers reject single-name smtp server
    >> aliases. They only accept full domain names ( domainname.com ).
    >>
    >> Do you have a registered domain name for your server ?
    >>
    >> If you do, just create a new smtp domain,
    >> and assign it your domain name.
    >>
    >> Not to worry, there won't be a name conflict.
    >>
    >> re:
    >>> It still doesn't work. I don't want to change the name as I don't know
    >>> how that would affect the other programs using CDONTS.

    >>
    >> You don't have to change the name of the existing smtp server.
    >>
    >> You can create as many aliases as you want to.
    >> Open the IIS MMC, select the default smtp server,
    >> expand the tree, select "Domain", right-click "Domains",
    >> and select "New" --> Domain.
    >>
    >> Then configure it as you see fit.
    >>
    >> The current domain will continue to work as usual.
    >>
    >>
    >>
    >>
    >>
    >> Juan T. Llibre
    >> ASP.NET MVP
    >> http://asp.net.do/foros/
    >> Foros de ASP.NET en Español
    >> =====================
    >>
    >> "tshad" <> wrote in message
    >> news:uoOa$...
    >>> "Juan T. Llibre" <> wrote in message
    >>> news:...
    >>>> re:
    >>>>> I tried setting it to:
    >>>>> SmtpMail.SmtpServer = "127.0.0.1"
    >>>>> But that didn't work.
    >>>>
    >>>> Did you set up the smtp server service ?
    >>>> If you didn't, that can't work.
    >>>
    >>> I looked and it was already set up and running.
    >>>
    >>> It was set up with the name "Simple Mail Transfer Protocol (SMTP)".
    >>>
    >>> It was logged on as a Local System Account.
    >>>
    >>>>
    >>>> I set up an smtp service, and assigned it the same
    >>>> name as my domain name, and it works all the time.
    >>>>
    >>>> Click your Start button, hit the "Help and Support" link,
    >>>> and search for "install smtp service" when the Help and
    >>>> Support Center opens.
    >>>>
    >>>> When the search ends, You should see several links
    >>>> with the information you need to setup the smtp service.
    >>>>
    >>>> Follow the instructions...
    >>>>
    >>>> Hint: you don't actually need to run the POP3
    >>>> service, although if you want to, you certainly can.
    >>>
    >>> I don't need need POP3, I only need to be able to send from my Web
    >>> Server.
    >>>
    >>>>
    >>>> What I did is that, after installing the POP3 and SMTP services,
    >>>> since I didn't want to run a full mail server, I uninstalled the
    >>>> POP3 service, *but left the SMTP service running*.
    >>>>
    >>>> Let us know if you run into trouble doing that.
    >>>
    >>> It still doesn't work. I don't want to change the name as I don't know
    >>> how that would affect the other programs using CDONTS.
    >>>
    >>> Tom
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> Juan T. Llibre
    >>>> ASP.NET MVP
    >>>> http://asp.net.do/foros/
    >>>> Foros de ASP.NET en Español
    >>>> =====================
    >>>>
    >>>> "tshad" <> wrote in message
    >>>> news:...
    >>>>> "tshad" <> wrote in message
    >>>>> news:...
    >>>>>> "Juan T. Llibre" <> wrote in message
    >>>>>> news:...
    >>>>>>> You could setup an smtp service in your W2K3 Server,
    >>>>>>> and use *that* to forward your emails, instead of
    >>>>>>> using your Exchange Server to relay the emails.
    >>>>>>>
    >>>>>>> It's pretty straightforward...and works like a charm.
    >>>>>>
    >>>>>> If CDONTS is working, would it already be doing that?
    >>>>>>
    >>>>>> Also, what would I put in my SmtpMail.SmtpServer field?
    >>>>>
    >>>>> I tried setting it to:
    >>>>>
    >>>>> SmtpMail.SmtpServer = "127.0.0.1"
    >>>>>
    >>>>> But that didn't work.
    >>>>>
    >>>>> Tom
    >>>>>>
    >>>>>> Thanks,
    >>>>>>
    >>>>>> Tom
    >>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>> Juan T. Llibre
    >>>>>>> ASP.NET MVP
    >>>>>>> http://asp.net.do/foros/
    >>>>>>> Foros de ASP.NET en Español
    >>>>>>> =====================
    >>>>>>>
    >>>>>>> "tshad" <> wrote in message
    >>>>>>> news:eqYc$%...
    >>>>>>>> "Cowboy (Gregory A. Beamer) - MVP"
    >>>>>>>> <> wrote in message
    >>>>>>>> news:...
    >>>>>>>>> Exchange, by default, only relays from the domain it sits on.
    >>>>>>>>> There are two
    >>>>>>>>> options:
    >>>>>>>>>
    >>>>>>>>> 1. Allow your domain (yahoo.com) to be added.
    >>>>>>>>> 2. Allow all relays from the IP address of the web server (better
    >>>>>>>>> option,
    >>>>>>>>> for security).
    >>>>>>>>
    >>>>>>>> But why is CDONTS working?
    >>>>>>>>
    >>>>>>>> Is it being sent from the Windows 2003 server instead of the
    >>>>>>>> Exchange Server?
    >>>>>>>>
    >>>>>>>> If this is the case, how do I tell System.Web.Mail to send it the
    >>>>>>>> same way?
    >>>>>>>>
    >>>>>>>> Which would be better?
    >>>>>>>>
    >>>>>>>> Thanks,
    >>>>>>>>
    >>>>>>>> Tom
    >>>>>>>>
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>> ---
    >>>>>>>>>
    >>>>>>>>> Gregory A. Beamer
    >>>>>>>>> MVP; MCP: +I, SE, SD, DBA
    >>>>>>>>>
    >>>>>>>>> ***************************
    >>>>>>>>> Think Outside the Box!
    >>>>>>>>> ***************************
    >>>>>>>>>
    >>>>>>>>>
    >>>>>>>>> "tshad" wrote:
    >>>>>>>>>
    >>>>>>>>>> I have a W2003 server running my website and I am trying to set
    >>>>>>>>>> up my pages
    >>>>>>>>>> to send email using System.Web.Mail.
    >>>>>>>>>>
    >>>>>>>>>> I have pages running on this machine using CDONTS that work fine.
    >>>>>>>>>>
    >>>>>>>>>> I am using our exchange server to send the mail but am getting an
    >>>>>>>>>> "Unable to
    >>>>>>>>>> relay" message. But the "From" name is my email address, which
    >>>>>>>>>> is obviously
    >>>>>>>>>> on our exchange server, so there is no relay.
    >>>>>>>>>>
    >>>>>>>>>> The message I get back is:
    >>>>>>>>>>
    >>>>>>>>>> "The server rejected one or more recipient addresses. The server
    >>>>>>>>>> response
    >>>>>>>>>> was: 550 5.7.1 Unable to relay for "
    >>>>>>>>>>
    >>>>>>>>>> My trace is showing:
    >>>>>>>>>>
    >>>>>>>>>> "Could not access 'CDO.Message' object.
    >>>>>>>>>> at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
    >>>>>>>>>> String
    >>>>>>>>>> methodName, Object[] args)
    >>>>>>>>>> at System.Web.Mail.CdoSysHelper.Send(MailMessage message)
    >>>>>>>>>> at System.Web.Mail.SmtpMail.Send(MailMessage message)
    >>>>>>>>>> at ASP.emailtest_aspx.Page_Load(Object sender, EventArgs e) in
    >>>>>>>>>> C:\Inetpub\wwwroot\payrollworkshop\Development\emailtest.aspx:line
    >>>>>>>>>> 15
    >>>>>>>>>> at System.Web.UI.Control.OnLoad(EventArgs e)
    >>>>>>>>>> at System.Web.UI.Control.LoadRecursive()
    >>>>>>>>>> at System.Web.UI.Page.ProcessRequestMain()"
    >>>>>>>>>>
    >>>>>>>>>> Am I missing something here?
    >>>>>>>>>>
    >>>>>>>>>> The is my personal email.
    >>>>>>>>>>
    >>>>>>>>>> Thanks,
    >>>>>>>>>>
    >>>>>>>>>> Tom
    >>>>>>>>>>
    >>>>>>>>>>
    >>>>>>>>>>
    >>>>>>>>
    >>>>>>>>
    >>>>>>>
    >>>>>>>
    >>>>>>
    >>>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>>

    >>
    >>

    >
    >
    Juan T. Llibre, Feb 8, 2005
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Learning SQL Server

    Email RegularExpression not working

    Learning SQL Server, Aug 7, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,457
    Chris R. Timmons
    Aug 8, 2003
  2. Alvin Bruney [MVP]

    Re: Links from email body not working

    Alvin Bruney [MVP], Apr 11, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    382
    Alvin Bruney [MVP]
    Apr 11, 2004
  3. dont bother
    Replies:
    1
    Views:
    258
    Ben Finney
    Mar 4, 2004
  4. Deathstar
    Replies:
    1
    Views:
    305
    Larry Bates
    Jun 17, 2004
  5. Replies:
    5
    Views:
    258
    Dr John Stockton
    Dec 23, 2005
Loading...

Share This Page