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 6125383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:14:28+00:00 2026-05-23T16:14:28+00:00

I am trying to send e-mail with classic ASP (I am stuck with an

  • 0

I am trying to send e-mail with classic ASP (I am stuck with an old app so I have to use classic ASP here) on Windows Server 2008 R2, IIS 7.5.

I guess lots of thing change from win server 2003 to 2008. I am using the following code but I am getting this error (BTW, error message is so “informative”);

error ‘8004020f’

/poo.asp, line 32

Here is the code;

<!-- 
    METADATA 
    TYPE="typelib" 
    UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"  
    NAME="CDO for Windows 2000 Library" 
-->  
<%  

    'Declare variables 
    Dim sch, cdoConfig, cdoMessage
    sch = "http://schemas.microsoft.com/cdo/configuration/" 

    Set cdoConfig = CreateObject("CDO.Configuration")  

    With cdoConfig.Fields  
        .Item(cdoSendUsingMethod) = cdoSendUsingPort  
        .Item(cdoSMTPServer) = "mail.example.com"
        'Set SMTP port which is 25 by default 
        .Item(sch & "smtpserverport") = 587 
        .Update  
    End With 

    Set cdoMessage = CreateObject("CDO.Message")  

    With cdoMessage 
        Set .Configuration = cdoConfig 
        .From = "info@example.com" 
        .To = "me@example2.com" 
        .Subject = "Sample CDO Message" 
        .TextBody = "This is a test for CDO.message" 
        .Send 
    End With 

    Set cdoMessage = Nothing  
    Set cdoConfig = Nothing  

Response.write "<HTML><head><title>A message has been sent.</title></head><body>A message has been sent.</body></HTML>"

%>

Also, I just installed Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=1004 into my server but it didn’t change anything.

NOTE: I could send e-mail over localhost if it works. doesn’t matter.

  • 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-23T16:14:28+00:00Added an answer on May 23, 2026 at 4:14 pm

    You might come across the following error:

    error ‘8004020f’ The event class for this subscription is in an

    invalid partition

    This error message comes from cdosys.h, and has nothing to do with any sort of “partition” – it is actually lumped in with other errors in an overloaded message. The error code is actually attributed to the following:

    CONST LONG CDO_E_RECIPIENTS_REJECTED = 0x8004020FL
    

    Which means that the e-mail was rejected by the server for some reason. Here are some things you can try to alleviate the problem:

    1. Make sure the SMTP server allows anonymous (non-authenticated) relaying. If your SMTP requires outgoing authentication, see Article #2026.

    2. Check if the problem is specific to the domain name(s) used in the e-mail addresses of the recipients. For example, some users have complained that they can send to users on their own domain only; others have said that they can send to any domain except their own (see Article #2511 for some potential causes and solutions).

    3. It may be simply that the e-mail address is being rejected, but other configuration settings on the SMTP server are preventing the true error message from being relayed propely back to the ASP script … so verify that the address is valid.

    4. If you have a proxy or firewall, make sure the web server is set up to correctly pass through it, that the SMTP server knows about it, and that the proxy allows access to port 25.

    5. Try using a SendUsing value of 1 (pickup) instead of 2 (port). E.g. the following line:

      .Item(cdoSendUsingMethod) = cdoSendUsingPort
      

    Becomes

    .Item(cdoSendUsingMethod) = cdoSendUsingPickup
    

    http://classicasp.aspfaq.com/email/why-does-cdo-message-give-me-8004020f-errors.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to configure a dedicated server that runs ASP.NET to send mail through
everyone! I'm trying to send mail in ASP.NET web-site. I have smtp configuration section
I am trying to send an email in ASP.NET using system.net.mail the problem is
I'm trying to use the code below to send messages via System.Net.Mail and am
I have a server which hosts mywebsite.com If I try to send mail to
I am trying to send a mail from my web2py app hosted on GoogleAppEngine.
Am trying to send a mail to recipient from iPhone app without user's interaction.
I have been trying to send a big attachment (9 MB) using C# ASP.NET
Im trying to send a mail from a asp.net script, but im getting this
I am trying to send mail from localhost.. and on doing this i have

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.