CDO email in Windows 2003

Discussion in 'ASP General' started by pilot@smorley.co.uk, May 20, 2005.

  1. Guest

    I am having trouble sending a form email on a remote W 2003 server.

    The test script I am using is as follows
    <%@ Language=VBScript %>
    <% Set objMessage = CreateObject("CDO.Message")
    objMessage.From = "me"
    objMessage.Subject = "test"
    objMessage.To = ""
    objMessage.TextBody = "testing"
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    = 2
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    = "mySMTPserver"
    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    = 25
    objMessage.Configuration.Fields.Update
    objMessage.Send
    %>

    I have been on this all morning and i'm well fed up.

    Is there something staring me in the face??
     
    , May 20, 2005
    #1
    1. Advertising

  2. McKirahan Guest

    <> wrote in message
    news:...
    > I am having trouble sending a form email on a remote W 2003 server.
    >
    > The test script I am using is as follows
    > <%@ Language=VBScript %>
    > <% Set objMessage = CreateObject("CDO.Message")
    > objMessage.From = "me"
    > objMessage.Subject = "test"
    > objMessage.To = ""
    > objMessage.TextBody = "testing"
    >

    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
    guration/sendusing")
    > = 2
    >

    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
    guration/smtpserver")
    > = "mySMTPserver"
    >

    objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
    guration/smtpserverport")
    > = 25
    > objMessage.Configuration.Fields.Update
    > objMessage.Send
    > %>
    >
    > I have been on this all morning and i'm well fed up.
    >
    > Is there something staring me in the face??


    Is "mySMTPserver" actually the name of your SMTP server?
     
    McKirahan, May 20, 2005
    #2
    1. Advertising

  3. Guest

    'course it aint! it's mail.whatever.co.uk I checked it with my
    service provider.
     
    , May 20, 2005
    #3
  4. Paxton Guest

    wrote:
    > 'course it aint! it's mail.whatever.co.uk I checked it with my
    > service provider.


    When you say you can't get it to work properly, what happens? What
    error messages do you get?
     
    Paxton, May 20, 2005
    #4
  5. Guest

    On my service provider, I merely get the "computer says no" message -
    ie This page cannot be displayed - no explanation.

    However, when I try it on my IIS server on my PC where I test sites, I
    get the following:-
    Error Type:
    (0x8004020E)
    Cannot modify or delete an object that was added using the COM+ Admin
    SDK
    /mepdynamic/test.asp, line 11

    Line 11 being "objMessage.Send"
     
    , May 20, 2005
    #5
  6. http://www.powerasp.com/content/new/sending_email_cdosys.asp



    <> wrote in message
    news:...
    >I am having trouble sending a form email on a remote W 2003 server.
    >
    > The test script I am using is as follows
    > <%@ Language=VBScript %>
    > <% Set objMessage = CreateObject("CDO.Message")
    > objMessage.From = "me"
    > objMessage.Subject = "test"
    > objMessage.To = ""
    > objMessage.TextBody = "testing"
    > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    > = 2
    > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    > = "mySMTPserver"
    > objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    > = 25
    > objMessage.Configuration.Fields.Update
    > objMessage.Send
    > %>
    >
    > I have been on this all morning and i'm well fed up.
    >
    > Is there something staring me in the face??
    >
     
    Kyle Peterson, May 20, 2005
    #6
  7. Guest

    Kyle. Thanks. I have emailed the service provider to find out if they
    require outgoing authentication. What a pain. I am developing this
    for a client and all the passwords, SMTP settings etc will have to be
    changed once it goes up on their site.

    Grrrrr!
     
    , May 20, 2005
    #7
  8. Guest

    Well it turns out that CDO is hugely variable!

    My service providers have provided me with a CDO script that works as
    follows:-

    <%

    Set objMessage = CreateObject("CDO.Message")
    objMessage.Subject = "Example CDO Message"
    objMessage.Sender = ""
    objMessage.To = "" objMessage.TextBody =
    "This is some sample message text."

    '==This section provides the configuration information for the remote
    SMTP server. '==Normally you will only change the server name or IP.

    objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

    'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item
    _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
    "localhost"

    'Server port (typically 25) objMessage.Configuration.Fields.Item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

    objMessage.Configuration.Fields.Update

    '==End remote SMTP server configuration section==

    objMessage.Send

    %>

    You will see that the remote config is set to "localhost" - this can
    also be the URL.

    BUT. you need a working email address at objMessage.sender in order
    for it to work.

    Why are there so many different ways none of which work on my server?

    Microsoft, are you not supposed to make things easier?

    Anyway, I still can't get it to work with my form emailer script. Has
    anyine got one that works with CDO?
     
    , May 23, 2005
    #8
  9. Mark Schupp Guest

    I just had to deal with CDO on XP and 2003 because increased security
    stopped the way I was using it from working. However, I've come in the
    middle of this thread and don't know what your original problem was. What
    error messages are you getting?

    --
    Mark Schupp



    <> wrote in message
    news:...
    > Well it turns out that CDO is hugely variable!
    >
    > My service providers have provided me with a CDO script that works as
    > follows:-
    >
    > <%
    >
    > Set objMessage = CreateObject("CDO.Message")
    > objMessage.Subject = "Example CDO Message"
    > objMessage.Sender = ""
    > objMessage.To = "" objMessage.TextBody =
    > "This is some sample message text."
    >
    > '==This section provides the configuration information for the remote
    > SMTP server. '==Normally you will only change the server name or IP.
    >
    > objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    >
    > 'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item
    > _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
    > "localhost"
    >
    > 'Server port (typically 25) objMessage.Configuration.Fields.Item _
    > ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    >
    > objMessage.Configuration.Fields.Update
    >
    > '==End remote SMTP server configuration section==
    >
    > objMessage.Send
    >
    > %>
    >
    > You will see that the remote config is set to "localhost" - this can
    > also be the URL.
    >
    > BUT. you need a working email address at objMessage.sender in order
    > for it to work.
    >
    > Why are there so many different ways none of which work on my server?
    >
    > Microsoft, are you not supposed to make things easier?
    >
    > Anyway, I still can't get it to work with my form emailer script. Has
    > anyine got one that works with CDO?
    >
     
    Mark Schupp, May 23, 2005
    #9
  10. Guest

    It's sorted now as far as the CDO part is concerned but I am still
    having problems merging it with a form emailer script.

    My service providers are being very helpful as I don't get a detailed
    error message from the remote server and I cannot test it on mine as
    all te settings are different for a local server.

    This makes testing scripts very difficult and time consuming for
    everyone.

    I really think a company as big as Microsoft could come up with a CDO
    mailer which would work the same on different computers using the same
    platform.

    GRRRR!!!!!
     
    , May 24, 2005
    #10
  11. Jeff Cochran Guest

    On 24 May 2005 05:02:56 -0700, wrote:

    >It's sorted now as far as the CDO part is concerned but I am still
    >having problems merging it with a form emailer script.
    >
    >My service providers are being very helpful as I don't get a detailed
    >error message from the remote server and I cannot test it on mine as
    >all te settings are different for a local server.
    >
    >This makes testing scripts very difficult and time consuming for
    >everyone.
    >
    >I really think a company as big as Microsoft could come up with a CDO
    >mailer which would work the same on different computers using the same
    >platform.


    They have. Except CDO isn't a "mailer" and isn't supported by default
    on Server 2003. It's deprecated and you should be using CDOSYS
    instead. Maybe if you described the problems you are having with
    "merging it with a form emailer script" we could suggest options.

    Most service providers have their own mail software options as well,
    have you checked with yours?

    Jeff
     
    Jeff Cochran, May 25, 2005
    #11
  12. Jeff Cochran Guest

    On Tue, 24 May 2005 18:19:45 -0500, "Dave Anderson"
    <> wrote:

    >"Jeff Cochran" wrote:
    >> They have. Except CDO isn't a "mailer" and isn't supported by
    >> default on Server 2003. It's deprecated and you should be using
    >> CDOSYS instead.

    >
    >News to me. And to Microsoft. CDO and CDOSYS are one and the same:


    Bleh! Gotta stop posting without a proper night's rest. Third post I
    responded to, first two were CDONTS related and I guess I went into
    autopilot.

    Of course you're correct. Change CDO to CDONTS in my response and
    it's correct, though useless in this case.

    Feel free to pummel me at will...

    Jeff
     
    Jeff Cochran, May 25, 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. Guest
    Replies:
    2
    Views:
    897
    dave wanta
    Jul 11, 2003
  2. Rob Meade

    Windows 2003 Server / CDO Emails - ASP FAQ

    Rob Meade, Nov 19, 2003, in forum: ASP General
    Replies:
    6
    Views:
    193
    Rob Meade
    Nov 22, 2003
  3. D Averch

    CDO Message not working in Windows 2003

    D Averch, Jul 7, 2004, in forum: ASP General
    Replies:
    2
    Views:
    671
    D Averch
    Jul 7, 2004
  4. Andyza
    Replies:
    3
    Views:
    197
    MyndPhlyp
    Oct 26, 2005
  5. Replies:
    0
    Views:
    287
Loading...

Share This Page