sending email using CDO Message

Discussion in 'ASP General' started by dave, May 5, 2004.

  1. dave

    dave Guest

    Hi There
    I have got little bit asp code to send email
    It was working if its hosted on windows 2000..

    But it doesnt work on winows server 2003..I guess it
    might be problem with specifying schema..I'm using CDO
    Message object. Below is the code tht i m using...

    sch = "http://schemas.microsoft.com/cdo/configuration/"
    Set cdoConfig = Server.CreateObject("CDO.Configuration")
    With cdoConfig.Fields
    .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
    .Item(sch & "smtpserver") = "mail.neospace.net.au"
    .update
    End With
    Set cdoMessage = Server.CreateObject("CDO.Message")
    With cdoMessage
    Set .Configuration = cdoConfig
    .From = ""
    .To = ""
    .Subject = "subject"
    .HtmLBody = "message body"
    .Send
    End With
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing

    Do i need to authorised and log in SMTP server using From
    id or its has different configuration problem ?
    Any suggestion would be appreciated
    Thanx
    dave
     
    dave, May 5, 2004
    #1
    1. Advertising

  2. What does "doesn't work" mean?

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "dave" <> wrote in message
    news:87ab01c43267$661d6800$...
    > Hi There
    > I have got little bit asp code to send email
    > It was working if its hosted on windows 2000..
    >
    > But it doesnt work on winows server 2003..I guess it
    > might be problem with specifying schema..I'm using CDO
    > Message object. Below is the code tht i m using...
    >
    > sch = "http://schemas.microsoft.com/cdo/configuration/"
    > Set cdoConfig = Server.CreateObject("CDO.Configuration")
    > With cdoConfig.Fields
    > .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
    > .Item(sch & "smtpserver") = "mail.neospace.net.au"
    > .update
    > End With
    > Set cdoMessage = Server.CreateObject("CDO.Message")
    > With cdoMessage
    > Set .Configuration = cdoConfig
    > .From = ""
    > .To = ""
    > .Subject = "subject"
    > .HtmLBody = "message body"
    > .Send
    > End With
    > Set cdoMessage = Nothing
    > Set cdoConfig = Nothing
    >
    > Do i need to authorised and log in SMTP server using From
    > id or its has different configuration problem ?
    > Any suggestion would be appreciated
    > Thanx
    > dave
    >
     
    Aaron Bertrand - MVP, May 5, 2004
    #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. Jay

    CDO not sending email

    Jay, Jan 15, 2004, in forum: ASP General
    Replies:
    5
    Views:
    135
  2. Irene
    Replies:
    0
    Views:
    238
    Irene
    May 1, 2004
  3. dave

    sending image thru email + CDO

    dave, Jun 8, 2004, in forum: ASP General
    Replies:
    2
    Views:
    189
    Aaron [SQL Server MVP]
    Jun 8, 2004
  4. Drew
    Replies:
    1
    Views:
    156
    Ray Costanzo [MVP]
    Dec 9, 2004
  5. Naveen Jain
    Replies:
    1
    Views:
    161
    Anthony Jones
    Jul 17, 2006
Loading...

Share This Page