Having trouble sending emails with CDO

Results 1 to 2 of 2

Thread: Having trouble sending emails with CDO

  1. #1
    Join Date
    Dec 1969

    Default Having trouble sending emails with CDO

    Hi... <BR><BR>My problem is that i cannot send emails using CDO (XP pro, IIS), think maybe my SMTP server is ****ed... Have no experience with it so hard to tell... Anyway i get this message:<BR><BR>"the event class for this subscription is located in an invalid partition"<BR><BR>here is my code:<BR><BR>Dim objConfig &#039; As CDO.Configuration<BR>Dim objMessage &#039; As CDO.Message<BR>Dim Fields &#039; As ADODB.Fields<BR><BR>&#039; Get a handle on the config object and it&#039;s fields<BR>Set objConfig = Server.CreateObject("CDO.Configuration")<BR>Set Fields = objConfig.Fields<BR><BR>&#039; Set config fields we care about<BR>With Fields<BR> .Item("http://schemas.microsoft.com/cdo/configuration/sendusing")= 2<BR> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"<BR> .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25<BR> .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10<BR> .Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0<BR> .Update<BR>End With<BR><BR>Set objMessage = Server.CreateObject("CDO.Message")<BR><BR>Set objMessage.Configuration = objConfig<BR><BR>With objMessage<BR> .To = "display name &#060;email_here&#062;"<BR> .From = "display name &#060;email_here&#062;"<BR> .Subject = "SMTP Relay Test"<BR> .TextBody = "SMTP Relay Test Sent @ " & Now()<BR> .Send<BR>End With<BR><BR>Set Fields = Nothing<BR>Set objMessage = Nothing<BR>Set objConfig = Nothing

  2. #2
    Join Date
    Dec 1969

    Default RE: Having trouble sending emails with CDO

    here&#039;s a config that WORKS<BR><BR>http://www.readthe****ingmanual.co.uk/infinitemonkeys/articles/iis/993.asp<BR><BR>and you&#039;re using the horrendous verbose method with CDO. you can do that in about a third of the code, you know.<BR><BR><BR><BR>j<BR>http://www.readthe****ingmanual.co.uk/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts