Print Page | Close Window

CDOSYS Error 8004020f

Printed From: Web Wiz Forums
Category: Web Wiz Hosting Services Forums
Forum Name: Web Wiz Hosting Support Forums
Forum Description: Support forum for Web Wiz Hosting services and solutions.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29309
Printed Date: 28 March 2026 at 9:17am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: CDOSYS Error 8004020f
Posted By: Electronomical
Subject: CDOSYS Error 8004020f
Date Posted: 08 May 2011 at 7:23pm
Hi I am moving away a webform application from fasthosts and hav it installed on webwiz.

I tried using my apps jmail include but failed as it does not support smtp user and password.(which worked fine on fasthosts).

I have now moved to the apps CDOSYS include with some success. I have an SMTP mail acount set up which I can send and receive. I have added the parmeters to my apps config file and when I submit a form the script runs then fails on the last line with the  Error 8004020f.

I put an invalid smtp server address and the script bombs with an unable to connect error so I must have the server address correct. I have double checked the user and paswd. I an sure they are right.

I have changed the sendusing parameter from 2 to 1 and this turns up a new error at the last line so something is happening.

CDO.Message.1 error '80040222'

The pickup directory path is required and was not specified.

/absolutefp/incEmail.asp, line 26

Any ideas what I am doing wrong.

Please don't give me to much script jargon cos I know diddly squat about it and i am using a prewritten forms package called Absolutefp

This is my email script.

<%
'//// Include for CDOSYS ////
emailcomponent="CDOSYS"
sub sendmail(recipient,senderemail,subject,message)
    Set iConf = CreateObject ("CDO.Configuration" )
    Set Flds = iConf.Fields
    Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = smtpserver
    Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    if smtpusr<>"" and smtppwd<>"" then
        Flds("http://schemas.microsoft.com/cdo/configuration/SMTPAuthenticate") = 1
        Flds("http://schemas.microsoft.com/cdo/configuration/SendUserName") = smtpusr
        Flds("http://schemas.microsoft.com/cdo/configuration/SendPassword") = smtppwd
    end if
    Flds.Update
    Set oMail= CreateObject("CDO.Message" )
    Set oMail.Configuration = iConf
    oMail.From = defaultemail
    if senderemail<>"" then
        oMail.From = senderemail
        omail.replyto = senderemail
    end if
    strTo=replace(recipient,vbcrlf,";")
    oMail.To = strTo   
    oMail.Subject = subject
    oMail.TextBody = message
    oMail.Send
    Set oMail = Nothing
end sub


%>


Any ideas.




 



Replies:
Posted By: WebWiz-Bruce
Date Posted: 09 May 2011 at 10:23am
You are able to use JMail on our servers, we have JMail 4 installed which does support authentication.

The error you have suggests that you are attempting to place the email in a pickup directly rather than sending the email across the network to the SMTP server.

The post below has an example of CDOSYS:-

http://forums.webwiz.net/sending-email-with-cdosys_topic28749_post144837.html#144837" rel="nofollow - http://forums.webwiz.net/sending-email-with-cdosys_topic28749_post144837.html#144837

If you are not able to update your code correctly from the above example, start a support ticket from your Client Area account and we will have a quick look for you to see if can find where you have the incorrect code.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net