CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
error '8004020f'
- Article ID:
217 - Date Created
Monday, December 17, 2018 - This Article Has been Viewed
965 times - Short Desc
Trying to send mail with CDOSYS, I get the following error, error '8004020f' - Details
Our variables are created to their associated form fields. So we have to make sure when we reuse the variables that we either "copy and paste" them. Or, if we are working on another page that was the variables are stored at. We need to make sure we properly spell them correctly. - Recreate Issue
To Recreate this issue, perform the following.<%
Set myMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 192.168.2.8
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") =sendusername
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") =sendpassword
myMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
myMail.To = recieverusername
myMail.Subject = "this is the subject"
myMail.From = sendusername
myMail.TextBody = "this is the body"
myMail.Send
Set myMail = Nothing
%>
In the above myMail.To, line.
We have "recieverusername", however, the variable is misspelled (receiver not, reciever). So, it is not finding the email address associated with the variable. - Resolve Issue
to resolve this issue.
Make sure all your variables are spelled correctly, and that they are associated with the proper form field, in order for the mail to send.
In the above issue, we see that the word "reciever" is incorrectly spelled, so to the CDOSYS component cannot find an email address to connect to the variable. Correctly spelling the word, will resolve this issue.
"receiverusername"<%
Set myMail = CreateObject("CDO.Message")
'This section provides the configuration information for the remote SMTP server.
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send the message using the network (SMTP over the network).
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 192.168.2.8
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False 'Use SSL for the connection (True or False)
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'basic (clear-text) authentication
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") =sendusername
myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") =sendpassword
myMail.Configuration.Fields.Update
'End remote SMTP server configuration section==
myMail.To = receiverusername ' variable correctly spelled out properly.
myMail.Subject = "this is the subject"
myMail.From = sendusername
myMail.TextBody = "this is the body"
myMail.Send
Set myMail = Nothing
%>
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19545
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16826