Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 848141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:53:46+00:00 2026-05-15T06:53:46+00:00

I have some ASP code that I’ve inherited from my predecessor (no, it’s not

  • 0

I have some ASP code that I’ve “inherited” from my predecessor (no, it’s not an option to update it at this time…It would take an act of not only Congress, but every other foreign country too) and I’m having an issue sending mail on one of the pages. It is an almost identical code snippet from the other page, but this one throws an error when I try to ‘Send’.

Code below:

Set myMail=CreateObject("CDO.Message")
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

'Name or IP of remote SMTP server
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")="localhost"

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

myMail.Subject="Subject"
myMail.From=from_email
myMail.To=email
myMail.TextBody= "Body Text of message"
myMail.Send

The error thrown is:
Error Type:
(0x8004020F)
The event class for this subscription is in an invalid partition

I’d appreciate any and all help!!!

Thanks!
JFV

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:53:47+00:00Added an answer on May 15, 2026 at 6:53 am

    I had similar issues trying to get CDO to work. I found a really cool article on this website Why does CDO.Message give me 8004020F errors?

    Here is the code I finally got to work. I could never get localhost to work as the SMTP Server. Find out what the name of the mail server is and make sure to use that name.

    <!--METADATA TYPE="typelib" UUID="CD000000-8B95-11D1-82DB-00C04FB1625D" NAME="CDO for Windows 2000 Type Library" -->
    <!--METADATA TYPE="typelib" UUID="00000205-0000-0010-8000-00AA006D2EA4" NAME="ADODB Type Library" -->
    <%
    Set cdoConfig = CreateObject("CDO.Configuration")
    
    With cdoConfig.Fields
            .Item(cdoSendUsingMethod) = cdoSendUsingPort
            .Item(cdoSMTPServer) = "nameofmailservergoeshere"
            .Update
    End With
    
    
    Set cdoMessage = CreateObject("CDO.Message")
    
    With cdoMessage
            Set .Configuration = cdoConfig
            .From = "me@mywebsite.com"
            .To = "you@yourwebsite.com"
            .Subject = "Sample CDO Message"
            .TextBody = "This is a a test message using CDO."
            .Send
    End With
    
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    %>
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that appends some rows to a table. One of the
I'm in the process of porting some code from Linux to Mac OS X.
i have a input tag which is non editable, but some times i need
I am attempting to pull some information from my tnsnames file using regex. I
I would like to get a sum from a column, with and without a
I want to have generalised email templates. Currently I have multiple email templates with
I have a login.jsp page which contains a login form. Once logged in the
I have several USB mass storage flash drives connected to a Ubuntu Linux computer
I am playing with TFS 2010, and am trying to setup a build process
I am trying to redirect to a specific path based on HTTP_HOST or SERVER_NAME

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.