CDONTS not working on W2000 Server

Discussion in 'ASP General' started by tshad, Nov 15, 2004.

  1. tshad

    tshad Guest

    I am trying to run a test sending mail using CDONTS on my W2K3
    machine.

    It works fine running from my WXP Pro, but I don't recieve the mail if
    run the W2K3 machine.

    Both machines have IIS configured essentially the same.


    ******************************************************************************************
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Untitled Document</title>
    </head>

    <body>

    <%
    response.write("Before Request.ServerVariables variable = " &
    Request.ServerVariables("LOCAL_ADDR") & "<br>")

    response.write("after Request.ServerVariables variable = " &
    Request.ServerVariables("LOCAL_ADDR") & "<br>")

    Dim iMsg
    Dim iConf
    Dim Flds
    Dim strHTML

    Const cdoSendUsingPickup = 1

    set iMsg = CreateObject("CDO.Message")
    set iConf = CreateObject("CDO.Configuration")

    Set Flds = iConf.Fields
    With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    = cdoSendUsingPickup
    ' TODO: Replace <PICKUP DIRECTORY> with path to your
    pickup directory
    ' Typically, c:\Inetpub\mailroot\pickup
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\pickup"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"
    .Update
    End With

    Dim iBP
    With iMsg
    Set .Configuration = iConf
    .To = ""
    .From = ""
    .Subject = "A test page"
    .HTMLBody = "This is a test page"
    'TODO: if adding an attachment,
    'uncomment the next line and alter file path as required
    'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    .Send
    End With


    ' Clean up variables.
    Set iBP = Nothing
    Set iMsg = Nothing
    Set iConf = Nothing
    Set Flds = Nothing

    %>
    </body>
    </html>
    **************************************************************************
    Is there something in Exchange that might be giving me a problem.

    Exchange is not running on either machine.

    Thanks,

    Tom.
     
    tshad, Nov 15, 2004
    #1
    1. Advertising

  2. Have you tried different domains (e.g. change the from and to to a hotmail
    account)?
    http://www.aspfaq.com/2511

    Did you check in the badmail, queue, pickup folders, etc?
    http://www.aspfaq.com/2254
    http://www.aspfaq.com/2268

    Since you have an SMTP server listed in the configuration properties, did
    you try using cdoSendUsingPort instead cdoSendUsingPickup?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "tshad" <> wrote in message
    news:#...
    > I am trying to run a test sending mail using CDONTS on my W2K3
    > machine.
    >
    > It works fine running from my WXP Pro, but I don't recieve the mail

    if
    > run the W2K3 machine.
    >
    > Both machines have IIS configured essentially the same.
    >
    >
    >

    ****************************************************************************
    **************
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > "http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=iso-8859-1">
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    >
    > <%
    > response.write("Before Request.ServerVariables variable = " &
    > Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >
    > response.write("after Request.ServerVariables variable = " &
    > Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >
    > Dim iMsg
    > Dim iConf
    > Dim Flds
    > Dim strHTML
    >
    > Const cdoSendUsingPickup = 1
    >
    > set iMsg = CreateObject("CDO.Message")
    > set iConf = CreateObject("CDO.Configuration")
    >
    > Set Flds = iConf.Fields
    > With Flds
    >

    ..Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    > = cdoSendUsingPickup
    > ' TODO: Replace <PICKUP DIRECTORY> with path to your
    > pickup directory
    > ' Typically, c:\Inetpub\mailroot\pickup
    >

    ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    ory")="C:\Inetpub\mailroot\pickup"
    >

    ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    erez.com"
    > .Update
    > End With
    >
    > Dim iBP
    > With iMsg
    > Set .Configuration = iConf
    > .To = ""
    > .From = ""
    > .Subject = "A test page"
    > .HTMLBody = "This is a test page"
    > 'TODO: if adding an attachment,
    > 'uncomment the next line and alter file path as required
    > 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    > .Send
    > End With
    >
    >
    > ' Clean up variables.
    > Set iBP = Nothing
    > Set iMsg = Nothing
    > Set iConf = Nothing
    > Set Flds = Nothing
    >
    > %>
    > </body>
    > </html>
    >

    **************************************************************************
    > Is there something in Exchange that might be giving me a problem.
    >
    > Exchange is not running on either machine.
    >
    > Thanks,
    >
    > Tom.
    >
    >
     
    Aaron [SQL Server MVP], Nov 15, 2004
    #2
    1. Advertising

  3. tshad

    Jeff Cochran Guest

    On Mon, 15 Nov 2004 11:46:26 -0800, "tshad"
    <> wrote:

    > I am trying to run a test sending mail using CDONTS on my W2K3
    >machine.
    >
    > It works fine running from my WXP Pro, but I don't recieve the mail if
    >run the W2K3 machine.


    CDONTS doesn't exist on Server 2003, switch to CDO.Message. See:

    http://www.aspfaq.com/show.asp?id=2026

    But of course your code below already uses CDO so that may not be your
    issue. Post error messages, check the queues, make sure that
    smtp.interez.com is available to your system, etc.

    Jeff

    > Both machines have IIS configured essentially the same.
    >
    >
    > ******************************************************************************************
    > <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >"http://www.w3.org/TR/html4/loose.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    >charset=iso-8859-1">
    > <title>Untitled Document</title>
    > </head>
    >
    > <body>
    >
    > <%
    > response.write("Before Request.ServerVariables variable = " &
    >Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >
    > response.write("after Request.ServerVariables variable = " &
    >Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >
    > Dim iMsg
    > Dim iConf
    > Dim Flds
    > Dim strHTML
    >
    > Const cdoSendUsingPickup = 1
    >
    > set iMsg = CreateObject("CDO.Message")
    > set iConf = CreateObject("CDO.Configuration")
    >
    > Set Flds = iConf.Fields
    > With Flds
    > .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >= cdoSendUsingPickup
    > ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >pickup directory
    > ' Typically, c:\Inetpub\mailroot\pickup
    > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\pickup"
    > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"
    > .Update
    > End With
    >
    > Dim iBP
    > With iMsg
    > Set .Configuration = iConf
    > .To = ""
    > .From = ""
    > .Subject = "A test page"
    > .HTMLBody = "This is a test page"
    > 'TODO: if adding an attachment,
    > 'uncomment the next line and alter file path as required
    > 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    > .Send
    > End With
    >
    >
    > ' Clean up variables.
    > Set iBP = Nothing
    > Set iMsg = Nothing
    > Set iConf = Nothing
    > Set Flds = Nothing
    >
    > %>
    > </body>
    > </html>
    > **************************************************************************
    > Is there something in Exchange that might be giving me a problem.
    >
    > Exchange is not running on either machine.
    >
    > Thanks,
    >
    > Tom.
    >
     
    Jeff Cochran, Nov 15, 2004
    #3
  4. > make sure that smtp.interez.com is available to your system,

    Since he specified cdoSendUsingPickup, I don't think this setting even comes
    into play. An external SMTP server wouldn't be able to grab mail from his
    local pickup folder anyway...

    A
     
    Aaron [SQL Server MVP], Nov 15, 2004
    #4
  5. tshad

    tshad Guest

    "Aaron [SQL Server MVP]" <> wrote in message
    news:%...
    > Have you tried different domains (e.g. change the from and to to a hotmail
    > account)?
    > http://www.aspfaq.com/2511
    >
    > Did you check in the badmail, queue, pickup folders, etc?
    > http://www.aspfaq.com/2254
    > http://www.aspfaq.com/2268
    >
    > Since you have an SMTP server listed in the configuration properties, did
    > you try using cdoSendUsingPort instead cdoSendUsingPickup?


    Haven't tried these yet. Not sure what they do - will look at the faqs you
    quoted.

    I assumed it was working correctly, since XP didn't have a problem.

    Thanks,

    Tom.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "tshad" <> wrote in message
    > news:#...
    >> I am trying to run a test sending mail using CDONTS on my W2K3
    >> machine.
    >>
    >> It works fine running from my WXP Pro, but I don't recieve the mail

    > if
    >> run the W2K3 machine.
    >>
    >> Both machines have IIS configured essentially the same.
    >>
    >>
    >>

    > ****************************************************************************
    > **************
    >> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >> "http://www.w3.org/TR/html4/loose.dtd">
    >> <html>
    >> <head>
    >> <meta http-equiv="Content-Type" content="text/html;
    >> charset=iso-8859-1">
    >> <title>Untitled Document</title>
    >> </head>
    >>
    >> <body>
    >>
    >> <%
    >> response.write("Before Request.ServerVariables variable = " &
    >> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>
    >> response.write("after Request.ServerVariables variable = " &
    >> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>
    >> Dim iMsg
    >> Dim iConf
    >> Dim Flds
    >> Dim strHTML
    >>
    >> Const cdoSendUsingPickup = 1
    >>
    >> set iMsg = CreateObject("CDO.Message")
    >> set iConf = CreateObject("CDO.Configuration")
    >>
    >> Set Flds = iConf.Fields
    >> With Flds
    >>

    > .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >> = cdoSendUsingPickup
    >> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >> pickup directory
    >> ' Typically, c:\Inetpub\mailroot\pickup
    >>

    > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    > ory")="C:\Inetpub\mailroot\pickup"
    >>

    > .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    > erez.com"
    >> .Update
    >> End With
    >>
    >> Dim iBP
    >> With iMsg
    >> Set .Configuration = iConf
    >> .To = ""
    >> .From = ""
    >> .Subject = "A test page"
    >> .HTMLBody = "This is a test page"
    >> 'TODO: if adding an attachment,
    >> 'uncomment the next line and alter file path as required
    >> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >> .Send
    >> End With
    >>
    >>
    >> ' Clean up variables.
    >> Set iBP = Nothing
    >> Set iMsg = Nothing
    >> Set iConf = Nothing
    >> Set Flds = Nothing
    >>
    >> %>
    >> </body>
    >> </html>
    >>

    > **************************************************************************
    >> Is there something in Exchange that might be giving me a problem.
    >>
    >> Exchange is not running on either machine.
    >>
    >> Thanks,
    >>
    >> Tom.
    >>
    >>

    >
    >
     
    tshad, Nov 15, 2004
    #5
  6. tshad

    tshad Guest

    "Jeff Cochran" <> wrote in message
    news:...
    > On Mon, 15 Nov 2004 11:46:26 -0800, "tshad"
    > <> wrote:
    >
    >> I am trying to run a test sending mail using CDONTS on my W2K3
    >>machine.
    >>
    >> It works fine running from my WXP Pro, but I don't recieve the mail
    >> if
    >>run the W2K3 machine.

    >
    > CDONTS doesn't exist on Server 2003, switch to CDO.Message. See:
    >
    > http://www.aspfaq.com/show.asp?id=2026
    >
    > But of course your code below already uses CDO so that may not be your
    > issue. Post error messages, check the queues, make sure that
    > smtp.interez.com is available to your system, etc.
    >


    I actually copied CDONTS to my server anyway from a 2000 server, just to see
    if that was the problem - it wasn't.

    However, you raise a good point - and I assumed (bad word) that if I was
    setting the smtpserver in the program it should work fine. Do I need to
    define the SMTP server (which is exchange and on another server) in my W2K3
    somewhere? Even though it seems to have SMTP set up in the services - do I
    need to point it to the Exchange server and will I have a relay problem in
    this configuration?

    Thanks,

    Tom.
    > Jeff
    >
    >> Both machines have IIS configured essentially the same.
    >>
    >>
    >>
    >> ******************************************************************************************
    >> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>"http://www.w3.org/TR/html4/loose.dtd">
    >> <html>
    >> <head>
    >> <meta http-equiv="Content-Type" content="text/html;
    >>charset=iso-8859-1">
    >> <title>Untitled Document</title>
    >> </head>
    >>
    >> <body>
    >>
    >> <%
    >> response.write("Before Request.ServerVariables variable = " &
    >>Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>
    >> response.write("after Request.ServerVariables variable = " &
    >>Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>
    >> Dim iMsg
    >> Dim iConf
    >> Dim Flds
    >> Dim strHTML
    >>
    >> Const cdoSendUsingPickup = 1
    >>
    >> set iMsg = CreateObject("CDO.Message")
    >> set iConf = CreateObject("CDO.Configuration")
    >>
    >> Set Flds = iConf.Fields
    >> With Flds
    >>
    >> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >>= cdoSendUsingPickup
    >> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >>pickup directory
    >> ' Typically, c:\Inetpub\mailroot\pickup
    >>
    >> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="C:\Inetpub\mailroot\pickup"
    >>
    >> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.interez.com"
    >> .Update
    >> End With
    >>
    >> Dim iBP
    >> With iMsg
    >> Set .Configuration = iConf
    >> .To = ""
    >> .From = ""
    >> .Subject = "A test page"
    >> .HTMLBody = "This is a test page"
    >> 'TODO: if adding an attachment,
    >> 'uncomment the next line and alter file path as required
    >> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >> .Send
    >> End With
    >>
    >>
    >> ' Clean up variables.
    >> Set iBP = Nothing
    >> Set iMsg = Nothing
    >> Set iConf = Nothing
    >> Set Flds = Nothing
    >>
    >> %>
    >> </body>
    >> </html>
    >>
    >> **************************************************************************
    >> Is there something in Exchange that might be giving me a problem.
    >>
    >> Exchange is not running on either machine.
    >>
    >> Thanks,
    >>
    >> Tom.
    >>

    >
     
    tshad, Nov 15, 2004
    #6
  7. tshad

    Jeff Cochran Guest

    On Mon, 15 Nov 2004 15:56:38 -0500, "Aaron [SQL Server MVP]"
    <> wrote:

    >> make sure that smtp.interez.com is available to your system,

    >
    >Since he specified cdoSendUsingPickup, I don't think this setting even comes
    >into play. An external SMTP server wouldn't be able to grab mail from his
    >local pickup folder anyway...


    Missed that. Then he needs to have an SMTP server running, and he
    said he didn't have Exchange on the systems.

    Perhaps the OP could test with a generic CDO script using a remote
    server.

    Jeff
     
    Jeff Cochran, Nov 15, 2004
    #7
  8. tshad

    Jeff Cochran Guest

    On Mon, 15 Nov 2004 13:01:36 -0800, "tshad"
    <> wrote:

    >"Aaron [SQL Server MVP]" <> wrote in message
    >news:%...
    >> Have you tried different domains (e.g. change the from and to to a hotmail
    >> account)?
    >> http://www.aspfaq.com/2511
    >>
    >> Did you check in the badmail, queue, pickup folders, etc?
    >> http://www.aspfaq.com/2254
    >> http://www.aspfaq.com/2268
    >>
    >> Since you have an SMTP server listed in the configuration properties, did
    >> you try using cdoSendUsingPort instead cdoSendUsingPickup?

    >
    >Haven't tried these yet. Not sure what they do - will look at the faqs you
    >quoted.
    >
    >I assumed it was working correctly, since XP didn't have a problem.


    Dumb question: Do you have the Server 2003 firewall on? Blocking
    port 25? And you can test your 2003 SMTP server outside of this to
    make sure it's working, see:

    HOW TO: Test SMTP Services Manually in Windows Server 2003
    http://support.microsoft.com/default.aspx?scid=kb;en-us;323350

    Jeff

    >> --
    >> http://www.aspfaq.com/
    >> (Reverse address to reply.)
    >>
    >>
    >>
    >>
    >> "tshad" <> wrote in message
    >> news:#...
    >>> I am trying to run a test sending mail using CDONTS on my W2K3
    >>> machine.
    >>>
    >>> It works fine running from my WXP Pro, but I don't recieve the mail

    >> if
    >>> run the W2K3 machine.
    >>>
    >>> Both machines have IIS configured essentially the same.
    >>>
    >>>
    >>>

    >> ****************************************************************************
    >> **************
    >>> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>> "http://www.w3.org/TR/html4/loose.dtd">
    >>> <html>
    >>> <head>
    >>> <meta http-equiv="Content-Type" content="text/html;
    >>> charset=iso-8859-1">
    >>> <title>Untitled Document</title>
    >>> </head>
    >>>
    >>> <body>
    >>>
    >>> <%
    >>> response.write("Before Request.ServerVariables variable = " &
    >>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>
    >>> response.write("after Request.ServerVariables variable = " &
    >>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>
    >>> Dim iMsg
    >>> Dim iConf
    >>> Dim Flds
    >>> Dim strHTML
    >>>
    >>> Const cdoSendUsingPickup = 1
    >>>
    >>> set iMsg = CreateObject("CDO.Message")
    >>> set iConf = CreateObject("CDO.Configuration")
    >>>
    >>> Set Flds = iConf.Fields
    >>> With Flds
    >>>

    >> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >>> = cdoSendUsingPickup
    >>> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >>> pickup directory
    >>> ' Typically, c:\Inetpub\mailroot\pickup
    >>>

    >> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    >> ory")="C:\Inetpub\mailroot\pickup"
    >>>

    >> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    >> erez.com"
    >>> .Update
    >>> End With
    >>>
    >>> Dim iBP
    >>> With iMsg
    >>> Set .Configuration = iConf
    >>> .To = ""
    >>> .From = ""
    >>> .Subject = "A test page"
    >>> .HTMLBody = "This is a test page"
    >>> 'TODO: if adding an attachment,
    >>> 'uncomment the next line and alter file path as required
    >>> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >>> .Send
    >>> End With
    >>>
    >>>
    >>> ' Clean up variables.
    >>> Set iBP = Nothing
    >>> Set iMsg = Nothing
    >>> Set iConf = Nothing
    >>> Set Flds = Nothing
    >>>
    >>> %>
    >>> </body>
    >>> </html>
    >>>

    >> **************************************************************************
    >>> Is there something in Exchange that might be giving me a problem.
    >>>
    >>> Exchange is not running on either machine.
    >>>
    >>> Thanks,
    >>>
    >>> Tom.
    >>>
    >>>

    >>
    >>

    >
     
    Jeff Cochran, Nov 15, 2004
    #8
  9. tshad

    tshad Guest

    "Jeff Cochran" <> wrote in message
    news:...
    > On Mon, 15 Nov 2004 13:01:36 -0800, "tshad"
    > <> wrote:
    >
    >>"Aaron [SQL Server MVP]" <> wrote in message
    >>news:%...
    >>> Have you tried different domains (e.g. change the from and to to a
    >>> hotmail
    >>> account)?
    >>> http://www.aspfaq.com/2511
    >>>
    >>> Did you check in the badmail, queue, pickup folders, etc?
    >>> http://www.aspfaq.com/2254
    >>> http://www.aspfaq.com/2268
    >>>
    >>> Since you have an SMTP server listed in the configuration properties,
    >>> did
    >>> you try using cdoSendUsingPort instead cdoSendUsingPickup?

    >>
    >>Haven't tried these yet. Not sure what they do - will look at the faqs
    >>you
    >>quoted.
    >>
    >>I assumed it was working correctly, since XP didn't have a problem.

    >
    > Dumb question: Do you have the Server 2003 firewall on? Blocking
    > port 25? And you can test your 2003 SMTP server outside of this to
    > make sure it's working, see:


    I don't know?

    Where would I check this?

    I also found that I can't get access to our Exchange server - we have it
    behind a checkpoint firewall.

    This machine is only running our Web Server (it is the Web Server Edition).

    Do I need to use our Exchange server?

    This machine does have SMTP on it and it is running automatically. We are
    only going to send outgoing messages. Can we just use SMTP on this machine?
    Do we have to configure it somewhere?

    Thanks,

    Tom.

    >
    > HOW TO: Test SMTP Services Manually in Windows Server 2003
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;323350
    >
    > Jeff
    >
    >>> --
    >>> http://www.aspfaq.com/
    >>> (Reverse address to reply.)
    >>>
    >>>
    >>>
    >>>
    >>> "tshad" <> wrote in message
    >>> news:#...
    >>>> I am trying to run a test sending mail using CDONTS on my W2K3
    >>>> machine.
    >>>>
    >>>> It works fine running from my WXP Pro, but I don't recieve the
    >>>> mail
    >>> if
    >>>> run the W2K3 machine.
    >>>>
    >>>> Both machines have IIS configured essentially the same.
    >>>>
    >>>>
    >>>>
    >>> ****************************************************************************
    >>> **************
    >>>> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>>> "http://www.w3.org/TR/html4/loose.dtd">
    >>>> <html>
    >>>> <head>
    >>>> <meta http-equiv="Content-Type" content="text/html;
    >>>> charset=iso-8859-1">
    >>>> <title>Untitled Document</title>
    >>>> </head>
    >>>>
    >>>> <body>
    >>>>
    >>>> <%
    >>>> response.write("Before Request.ServerVariables variable = " &
    >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>
    >>>> response.write("after Request.ServerVariables variable = " &
    >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>
    >>>> Dim iMsg
    >>>> Dim iConf
    >>>> Dim Flds
    >>>> Dim strHTML
    >>>>
    >>>> Const cdoSendUsingPickup = 1
    >>>>
    >>>> set iMsg = CreateObject("CDO.Message")
    >>>> set iConf = CreateObject("CDO.Configuration")
    >>>>
    >>>> Set Flds = iConf.Fields
    >>>> With Flds
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >>>> = cdoSendUsingPickup
    >>>> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >>>> pickup directory
    >>>> ' Typically, c:\Inetpub\mailroot\pickup
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    >>> ory")="C:\Inetpub\mailroot\pickup"
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    >>> erez.com"
    >>>> .Update
    >>>> End With
    >>>>
    >>>> Dim iBP
    >>>> With iMsg
    >>>> Set .Configuration = iConf
    >>>> .To = ""
    >>>> .From = ""
    >>>> .Subject = "A test page"
    >>>> .HTMLBody = "This is a test page"
    >>>> 'TODO: if adding an attachment,
    >>>> 'uncomment the next line and alter file path as
    >>>> required
    >>>> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >>>> .Send
    >>>> End With
    >>>>
    >>>>
    >>>> ' Clean up variables.
    >>>> Set iBP = Nothing
    >>>> Set iMsg = Nothing
    >>>> Set iConf = Nothing
    >>>> Set Flds = Nothing
    >>>>
    >>>> %>
    >>>> </body>
    >>>> </html>
    >>>>
    >>> **************************************************************************
    >>>> Is there something in Exchange that might be giving me a problem.
    >>>>
    >>>> Exchange is not running on either machine.
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom.
    >>>>
    >>>>
    >>>
    >>>

    >>

    >
     
    tshad, Nov 15, 2004
    #9
  10. tshad

    tshad Guest

    "Jeff Cochran" <> wrote in message
    news:...
    > On Mon, 15 Nov 2004 15:56:38 -0500, "Aaron [SQL Server MVP]"
    > <> wrote:
    >
    >>> make sure that smtp.interez.com is available to your system,

    >>
    >>Since he specified cdoSendUsingPickup, I don't think this setting even
    >>comes
    >>into play. An external SMTP server wouldn't be able to grab mail from his
    >>local pickup folder anyway...

    >
    > Missed that. Then he needs to have an SMTP server running, and he
    > said he didn't have Exchange on the systems.


    I just replied to that questions (just found out that I can't access the
    Exchange server here). We apparently do have SMTP running on the server,
    but don't know if I need to configure it specifically.

    Tom.
    >
    > Perhaps the OP could test with a generic CDO script using a remote
    > server.
    >
    > Jeff
     
    tshad, Nov 15, 2004
    #10
  11. tshad

    tshad Guest

    "Jeff Cochran" <> wrote in message
    news:...
    > On Mon, 15 Nov 2004 13:01:36 -0800, "tshad"
    > <> wrote:
    >
    >>"Aaron [SQL Server MVP]" <> wrote in message
    >>news:%...
    >>> Have you tried different domains (e.g. change the from and to to a
    >>> hotmail
    >>> account)?
    >>> http://www.aspfaq.com/2511
    >>>
    >>> Did you check in the badmail, queue, pickup folders, etc?
    >>> http://www.aspfaq.com/2254
    >>> http://www.aspfaq.com/2268
    >>>
    >>> Since you have an SMTP server listed in the configuration properties,
    >>> did
    >>> you try using cdoSendUsingPort instead cdoSendUsingPickup?

    >>
    >>Haven't tried these yet. Not sure what they do - will look at the faqs
    >>you
    >>quoted.
    >>
    >>I assumed it was working correctly, since XP didn't have a problem.

    >
    > Dumb question: Do you have the Server 2003 firewall on? Blocking
    > port 25? And you can test your 2003 SMTP server outside of this to
    > make sure it's working, see:
    >
    > HOW TO: Test SMTP Services Manually in Windows Server 2003
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;323350


    I did try this, as you suggested.

    I was a little confused on this. When it says open <machinename> 25, I
    assume it means the server I am on.

    Then it says "mail from:". I put in my address, which it
    took.

    Then it says "rcpt to:". I got the error "550 5.7.1
    Unable to relay for " or "550 5.7.1 Unable to relay for
    ". ftsolutions.com is our domain and deltanet.com is the
    domain at my house.

    Why am I getting this?

    I originally wanted to send the message to my address: - why am
    I getting the error? The exchange server is on another machine - which this
    machine can't see.

    Also, how do you delete characters in Telnet. If I make a mistake, I use
    backspace to delete the characters and it moves back to allow me to retype,
    but then I always get an error. When I retype it, it works fine.

    Thanks,

    Tom.



    >
    > Jeff
    >
    >>> --
    >>> http://www.aspfaq.com/
    >>> (Reverse address to reply.)
    >>>
    >>>
    >>>
    >>>
    >>> "tshad" <> wrote in message
    >>> news:#...
    >>>> I am trying to run a test sending mail using CDONTS on my W2K3
    >>>> machine.
    >>>>
    >>>> It works fine running from my WXP Pro, but I don't recieve the
    >>>> mail
    >>> if
    >>>> run the W2K3 machine.
    >>>>
    >>>> Both machines have IIS configured essentially the same.
    >>>>
    >>>>
    >>>>
    >>> ****************************************************************************
    >>> **************
    >>>> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>>> "http://www.w3.org/TR/html4/loose.dtd">
    >>>> <html>
    >>>> <head>
    >>>> <meta http-equiv="Content-Type" content="text/html;
    >>>> charset=iso-8859-1">
    >>>> <title>Untitled Document</title>
    >>>> </head>
    >>>>
    >>>> <body>
    >>>>
    >>>> <%
    >>>> response.write("Before Request.ServerVariables variable = " &
    >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>
    >>>> response.write("after Request.ServerVariables variable = " &
    >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>
    >>>> Dim iMsg
    >>>> Dim iConf
    >>>> Dim Flds
    >>>> Dim strHTML
    >>>>
    >>>> Const cdoSendUsingPickup = 1
    >>>>
    >>>> set iMsg = CreateObject("CDO.Message")
    >>>> set iConf = CreateObject("CDO.Configuration")
    >>>>
    >>>> Set Flds = iConf.Fields
    >>>> With Flds
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >>>> = cdoSendUsingPickup
    >>>> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >>>> pickup directory
    >>>> ' Typically, c:\Inetpub\mailroot\pickup
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    >>> ory")="C:\Inetpub\mailroot\pickup"
    >>>>
    >>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    >>> erez.com"
    >>>> .Update
    >>>> End With
    >>>>
    >>>> Dim iBP
    >>>> With iMsg
    >>>> Set .Configuration = iConf
    >>>> .To = ""
    >>>> .From = ""
    >>>> .Subject = "A test page"
    >>>> .HTMLBody = "This is a test page"
    >>>> 'TODO: if adding an attachment,
    >>>> 'uncomment the next line and alter file path as
    >>>> required
    >>>> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >>>> .Send
    >>>> End With
    >>>>
    >>>>
    >>>> ' Clean up variables.
    >>>> Set iBP = Nothing
    >>>> Set iMsg = Nothing
    >>>> Set iConf = Nothing
    >>>> Set Flds = Nothing
    >>>>
    >>>> %>
    >>>> </body>
    >>>> </html>
    >>>>
    >>> **************************************************************************
    >>>> Is there something in Exchange that might be giving me a problem.
    >>>>
    >>>> Exchange is not running on either machine.
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Tom.
    >>>>
    >>>>
    >>>
    >>>

    >>

    >
     
    tshad, Nov 15, 2004
    #11
  12. Your SMTP server has restrictions to prevent just anyone from using it as a
    relay. So, set the @from address to an address that is allowed. If you
    don't know how to check these things, check with the person who is
    responsible for maintaining your SMTP server... (e.g. the Exchange guy)

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "tshad" <> wrote in message
    news:...
    > "Jeff Cochran" <> wrote in message
    > news:...
    > > On Mon, 15 Nov 2004 13:01:36 -0800, "tshad"
    > > <> wrote:
    > >
    > >>"Aaron [SQL Server MVP]" <> wrote in message
    > >>news:%...
    > >>> Have you tried different domains (e.g. change the from and to to a
    > >>> hotmail
    > >>> account)?
    > >>> http://www.aspfaq.com/2511
    > >>>
    > >>> Did you check in the badmail, queue, pickup folders, etc?
    > >>> http://www.aspfaq.com/2254
    > >>> http://www.aspfaq.com/2268
    > >>>
    > >>> Since you have an SMTP server listed in the configuration properties,
    > >>> did
    > >>> you try using cdoSendUsingPort instead cdoSendUsingPickup?
    > >>
    > >>Haven't tried these yet. Not sure what they do - will look at the faqs
    > >>you
    > >>quoted.
    > >>
    > >>I assumed it was working correctly, since XP didn't have a problem.

    > >
    > > Dumb question: Do you have the Server 2003 firewall on? Blocking
    > > port 25? And you can test your 2003 SMTP server outside of this to
    > > make sure it's working, see:
    > >
    > > HOW TO: Test SMTP Services Manually in Windows Server 2003
    > > http://support.microsoft.com/default.aspx?scid=kb;en-us;323350

    >
    > I did try this, as you suggested.
    >
    > I was a little confused on this. When it says open <machinename> 25, I
    > assume it means the server I am on.
    >
    > Then it says "mail from:". I put in my address, which it
    > took.
    >
    > Then it says "rcpt to:". I got the error "550 5.7.1
    > Unable to relay for " or "550 5.7.1 Unable to relay for
    > ". ftsolutions.com is our domain and deltanet.com is the
    > domain at my house.
    >
    > Why am I getting this?
    >
    > I originally wanted to send the message to my address: - why

    am
    > I getting the error? The exchange server is on another machine - which

    this
    > machine can't see.
    >
    > Also, how do you delete characters in Telnet. If I make a mistake, I use
    > backspace to delete the characters and it moves back to allow me to

    retype,
    > but then I always get an error. When I retype it, it works fine.
    >
    > Thanks,
    >
    > Tom.
    >
    >
    >
    > >
    > > Jeff
    > >
    > >>> --
    > >>> http://www.aspfaq.com/
    > >>> (Reverse address to reply.)
    > >>>
    > >>>
    > >>>
    > >>>
    > >>> "tshad" <> wrote in message
    > >>> news:#...
    > >>>> I am trying to run a test sending mail using CDONTS on my W2K3
    > >>>> machine.
    > >>>>
    > >>>> It works fine running from my WXP Pro, but I don't recieve the
    > >>>> mail
    > >>> if
    > >>>> run the W2K3 machine.
    > >>>>
    > >>>> Both machines have IIS configured essentially the same.
    > >>>>
    > >>>>
    > >>>>
    > >>>

    ****************************************************************************
    > >>> **************
    > >>>> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    > >>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    > >>>> "http://www.w3.org/TR/html4/loose.dtd">
    > >>>> <html>
    > >>>> <head>
    > >>>> <meta http-equiv="Content-Type" content="text/html;
    > >>>> charset=iso-8859-1">
    > >>>> <title>Untitled Document</title>
    > >>>> </head>
    > >>>>
    > >>>> <body>
    > >>>>
    > >>>> <%
    > >>>> response.write("Before Request.ServerVariables variable = " &
    > >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    > >>>>
    > >>>> response.write("after Request.ServerVariables variable = " &
    > >>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    > >>>>
    > >>>> Dim iMsg
    > >>>> Dim iConf
    > >>>> Dim Flds
    > >>>> Dim strHTML
    > >>>>
    > >>>> Const cdoSendUsingPickup = 1
    > >>>>
    > >>>> set iMsg = CreateObject("CDO.Message")
    > >>>> set iConf = CreateObject("CDO.Configuration")
    > >>>>
    > >>>> Set Flds = iConf.Fields
    > >>>> With Flds
    > >>>>
    > >>> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    > >>>> = cdoSendUsingPickup
    > >>>> ' TODO: Replace <PICKUP DIRECTORY> with path to

    your
    > >>>> pickup directory
    > >>>> ' Typically, c:\Inetpub\mailroot\pickup
    > >>>>
    > >>>

    ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    > >>> ory")="C:\Inetpub\mailroot\pickup"
    > >>>>
    > >>>

    ..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    > >>> erez.com"
    > >>>> .Update
    > >>>> End With
    > >>>>
    > >>>> Dim iBP
    > >>>> With iMsg
    > >>>> Set .Configuration = iConf
    > >>>> .To = ""
    > >>>> .From = ""
    > >>>> .Subject = "A test page"
    > >>>> .HTMLBody = "This is a test page"
    > >>>> 'TODO: if adding an attachment,
    > >>>> 'uncomment the next line and alter file path as
    > >>>> required
    > >>>> 'Set iBP = iMsg.AddAttachment(App.Path &

    "\file1.txt")
    > >>>> .Send
    > >>>> End With
    > >>>>
    > >>>>
    > >>>> ' Clean up variables.
    > >>>> Set iBP = Nothing
    > >>>> Set iMsg = Nothing
    > >>>> Set iConf = Nothing
    > >>>> Set Flds = Nothing
    > >>>>
    > >>>> %>
    > >>>> </body>
    > >>>> </html>
    > >>>>
    > >>>

    **************************************************************************
    > >>>> Is there something in Exchange that might be giving me a

    problem.
    > >>>>
    > >>>> Exchange is not running on either machine.
    > >>>>
    > >>>> Thanks,
    > >>>>
    > >>>> Tom.
    > >>>>
    > >>>>
    > >>>
    > >>>
    > >>

    > >

    >
    >
     
    Aaron [SQL Server MVP], Nov 15, 2004
    #12
  13. tshad

    Jeff Cochran Guest

    On Mon, 15 Nov 2004 13:49:01 -0800, "tshad"
    <> wrote:

    >"Jeff Cochran" <> wrote in message
    >news:...
    >> On Mon, 15 Nov 2004 13:01:36 -0800, "tshad"
    >> <> wrote:
    >>
    >>>"Aaron [SQL Server MVP]" <> wrote in message
    >>>news:%...
    >>>> Have you tried different domains (e.g. change the from and to to a
    >>>> hotmail
    >>>> account)?
    >>>> http://www.aspfaq.com/2511
    >>>>
    >>>> Did you check in the badmail, queue, pickup folders, etc?
    >>>> http://www.aspfaq.com/2254
    >>>> http://www.aspfaq.com/2268
    >>>>
    >>>> Since you have an SMTP server listed in the configuration properties,
    >>>> did
    >>>> you try using cdoSendUsingPort instead cdoSendUsingPickup?
    >>>
    >>>Haven't tried these yet. Not sure what they do - will look at the faqs
    >>>you
    >>>quoted.
    >>>
    >>>I assumed it was working correctly, since XP didn't have a problem.

    >>
    >> Dumb question: Do you have the Server 2003 firewall on? Blocking
    >> port 25? And you can test your 2003 SMTP server outside of this to
    >> make sure it's working, see:

    >
    >I don't know?
    >
    >Where would I check this?


    The firewall is in the Network Connection Properties, Advanced tab.

    >I also found that I can't get access to our Exchange server - we have it
    >behind a checkpoint firewall.
    >
    >This machine is only running our Web Server (it is the Web Server Edition).
    >
    >Do I need to use our Exchange server?


    No.

    >This machine does have SMTP on it and it is running automatically. We are
    >only going to send outgoing messages. Can we just use SMTP on this machine?


    Yes.

    >Do we have to configure it somewhere?


    Yes.

    >Tom.


    Did you do this:

    >> HOW TO: Test SMTP Services Manually in Windows Server 2003
    >> http://support.microsoft.com/default.aspx?scid=kb;en-us;323350


    Also, there is an SMTP group to help with this, it's outside ASP if
    the above test won't work.

    Jeff


    >>>> http://www.aspfaq.com/
    >>>> (Reverse address to reply.)
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> "tshad" <> wrote in message
    >>>> news:#...
    >>>>> I am trying to run a test sending mail using CDONTS on my W2K3
    >>>>> machine.
    >>>>>
    >>>>> It works fine running from my WXP Pro, but I don't recieve the
    >>>>> mail
    >>>> if
    >>>>> run the W2K3 machine.
    >>>>>
    >>>>> Both machines have IIS configured essentially the same.
    >>>>>
    >>>>>
    >>>>>
    >>>> ****************************************************************************
    >>>> **************
    >>>>> <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    >>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    >>>>> "http://www.w3.org/TR/html4/loose.dtd">
    >>>>> <html>
    >>>>> <head>
    >>>>> <meta http-equiv="Content-Type" content="text/html;
    >>>>> charset=iso-8859-1">
    >>>>> <title>Untitled Document</title>
    >>>>> </head>
    >>>>>
    >>>>> <body>
    >>>>>
    >>>>> <%
    >>>>> response.write("Before Request.ServerVariables variable = " &
    >>>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>>
    >>>>> response.write("after Request.ServerVariables variable = " &
    >>>>> Request.ServerVariables("LOCAL_ADDR") & "<br>")
    >>>>>
    >>>>> Dim iMsg
    >>>>> Dim iConf
    >>>>> Dim Flds
    >>>>> Dim strHTML
    >>>>>
    >>>>> Const cdoSendUsingPickup = 1
    >>>>>
    >>>>> set iMsg = CreateObject("CDO.Message")
    >>>>> set iConf = CreateObject("CDO.Configuration")
    >>>>>
    >>>>> Set Flds = iConf.Fields
    >>>>> With Flds
    >>>>>
    >>>> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >>>>> = cdoSendUsingPickup
    >>>>> ' TODO: Replace <PICKUP DIRECTORY> with path to your
    >>>>> pickup directory
    >>>>> ' Typically, c:\Inetpub\mailroot\pickup
    >>>>>
    >>>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
    >>>> ory")="C:\Inetpub\mailroot\pickup"
    >>>>>
    >>>> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.int
    >>>> erez.com"
    >>>>> .Update
    >>>>> End With
    >>>>>
    >>>>> Dim iBP
    >>>>> With iMsg
    >>>>> Set .Configuration = iConf
    >>>>> .To = ""
    >>>>> .From = ""
    >>>>> .Subject = "A test page"
    >>>>> .HTMLBody = "This is a test page"
    >>>>> 'TODO: if adding an attachment,
    >>>>> 'uncomment the next line and alter file path as
    >>>>> required
    >>>>> 'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
    >>>>> .Send
    >>>>> End With
    >>>>>
    >>>>>
    >>>>> ' Clean up variables.
    >>>>> Set iBP = Nothing
    >>>>> Set iMsg = Nothing
    >>>>> Set iConf = Nothing
    >>>>> Set Flds = Nothing
    >>>>>
    >>>>> %>
    >>>>> </body>
    >>>>> </html>
    >>>>>
    >>>> **************************************************************************
    >>>>> Is there something in Exchange that might be giving me a problem.
    >>>>>
    >>>>> Exchange is not running on either machine.
    >>>>>
    >>>>> Thanks,
    >>>>>
    >>>>> Tom.
    >>>>>
    >>>>>
    >>>>
    >>>>
    >>>

    >>

    >
     
    Jeff Cochran, Nov 16, 2004
    #13
    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. Angel Faus
    Replies:
    1
    Views:
    430
    John Soulis [MSFT]
    Nov 10, 2003
  2. JRob
    Replies:
    1
    Views:
    347
    Alexey Smirnov
    Feb 19, 2007
  3. Replies:
    1
    Views:
    126
  4. John Wood

    new W2000 Server Pro system - ASP missing

    John Wood, Nov 25, 2003, in forum: ASP General
    Replies:
    3
    Views:
    103
    Ray at
    Nov 25, 2003
  5. Volker Schmid

    ASP-Script works on W2000, but not on W2003?

    Volker Schmid, Nov 19, 2005, in forum: ASP General
    Replies:
    0
    Views:
    97
    Volker Schmid
    Nov 19, 2005
Loading...

Share This Page