CDO.MESSAGE

Discussion in 'ASP General' started by rn5a@rediffmail.com, Apr 30, 2007.

  1. Guest

    I am trying to send mails through ASP using CDO.MESSAGE but I don't
    know why I am always getting the following error message:

    Cannot modify or delete an object that was added using the COM+ Admin
    SDK.

    This is the code:

    <%
    Dim strMsg,sch,cdoConfig,cdoMessage

    strMsg="Hello how are you?"
    sch="http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig=Server.CreateObject("CDO.CONFIGURATION")
    With cdoConfig.Fields
    .Item(sch & "sendusing")=2
    .Item(sch & "smtpserver")="smtp.mail.yahoo.co.uk"
    .Item(sch & "smtpserverport")=25
    .Update
    End With

    Set cdoMessage=Server.CreateObject("CDO.MESSAGE")
    Set cdoMessage.Configuration=cdoConfig

    cdoMessage.From=""
    cdoMessage.To=""
    cdoMessage.Subject="Hello"
    cdoMessage.HtmlBody=strMsg
    cdoMessage.Send

    Set cdoMessage=Nothing
    Set cdoConfig=Nothing
    %>

    The error points to the cdoMessage.Send line. Can someone please give
    me some idea on what I could be missing?

    I have gone through numerous posts & articles since last 2 days but
    couldn't resolve the issue. So somebody please help me....I need a
    solution urgently.

    Please note that the Yahoo SMTP server & the 2 e-mail ids do exist.
    , Apr 30, 2007
    #1
    1. Advertising

  2. Rob^_^ Guest

    Hi rn,

    A guess... You need the server and the CDO(nts) object on the same
    machine...


    Looks like MS is quite rightly blocking hackers from piping email through
    their smtp servers.


    Regards.
    <> wrote in message
    news:...
    >I am trying to send mails through ASP using CDO.MESSAGE but I don't
    > know why I am always getting the following error message:
    >
    > Cannot modify or delete an object that was added using the COM+ Admin
    > SDK.
    >
    > This is the code:
    >
    > <%
    > Dim strMsg,sch,cdoConfig,cdoMessage
    >
    > strMsg="Hello how are you?"
    > sch="http://schemas.microsoft.com/cdo/configuration/"
    > Set cdoConfig=Server.CreateObject("CDO.CONFIGURATION")
    > With cdoConfig.Fields
    > .Item(sch & "sendusing")=2
    > .Item(sch & "smtpserver")="smtp.mail.yahoo.co.uk"
    > .Item(sch & "smtpserverport")=25
    > .Update
    > End With
    >
    > Set cdoMessage=Server.CreateObject("CDO.MESSAGE")
    > Set cdoMessage.Configuration=cdoConfig
    >
    > cdoMessage.From=""
    > cdoMessage.To=""
    > cdoMessage.Subject="Hello"
    > cdoMessage.HtmlBody=strMsg
    > cdoMessage.Send
    >
    > Set cdoMessage=Nothing
    > Set cdoConfig=Nothing
    > %>
    >
    > The error points to the cdoMessage.Send line. Can someone please give
    > me some idea on what I could be missing?
    >
    > I have gone through numerous posts & articles since last 2 days but
    > couldn't resolve the issue. So somebody please help me....I need a
    > solution urgently.
    >
    > Please note that the Yahoo SMTP server & the 2 e-mail ids do exist.
    >
    Rob^_^, May 3, 2007
    #2
    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. Anthony Fine
    Replies:
    3
    Views:
    3,178
    Jure Spik
    Feb 12, 2004
  2. Cyndia A.
    Replies:
    0
    Views:
    628
    Cyndia A.
    Jan 14, 2004
  3. Lars-Erik Aabech

    Could not access 'CDO.Message' object

    Lars-Erik Aabech, Mar 3, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,780
    Henrik_the_boss
    Mar 4, 2004
  4. Guest
    Replies:
    2
    Views:
    870
    dave wanta
    Jul 11, 2003
  5. Replies:
    0
    Views:
    277
Loading...

Share This Page