473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

cdo.message

Hi Using WIN XP and FP2000

Using CDO.message to out put a message from my site, I get the following
error message 8004020f from using the code:-

strsql = "SELECT * FROM details WHERE patid = " & request("to") & ";"
objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic, adcmdtext

thetext = "Hello, " & request("nickto") & " you have a new message on online
Connect from " & session("username") & "<br> <a target='_top'
href='http://www.onlineconnect.biz/daters'><big><em><strong>Click here to
log
into the site</strong></em></big></a> then check your messages.<br> Good
luck"

Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
..Item(cdoSendUsingMethod) = cdoSendUsingPort
..Item(cdoSMTPServer) = "pegasus.intonet.co.uk"
..Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set.Configuration = cdoConfig
..From = "we*******@onlineconnect.biz"
..To = objrec("emailaddress")
..cc = "ul******@hotmail.com"
..Subject = "New messgage from Online Connect"
..HTMLBody = thetext
..Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing

any ideas?? thanks in advance Hugh


Jul 19 '05 #1
3 6970
there is something at aspfaq.com I have posted further down, but first I
would try this code directly below. (its in VB, you need to make
adjustments).

it seems to work from behind firewalls and the like, more info here
http://msdn.microsoft.com/library/de...figuration.asp

Dim iMsg As CDO.Message
Dim iConf
Dim Flds
Const cdoSendUsingPickup = 1
Const strPickup = "c:\inetpub\mailroot\pickup"

Private Sub createMailObject()
'Create the message object.
Set iMsg = CreateObject("CDO.Message")

'Create the configuration object.
Set iConf = iMsg.Configuration

With iConf.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPickup

..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirect
ory") = strPickup
.Update
End With

End Sub


Sub sendHTML(cdoTo As String, cdoFRom As String, cdoSubject As String,
cdoHTML As String, Optional cdoAttch As Variant = "")
createMailObject
With iMsg
If IsArray(cdoAttch) Then
For Each thing In cdoAttch
.AddAttachment (thing)
Next
End If
.To = cdoTo
.From = cdoFRom
.Subject = cdoSubject
.HTMLBody = cdoHTML
.Send
End With
Set iMsg = Nothing
End Sub
Sub sendText(cdoTo As String, cdoFRom As String, cdoSubject As String,
cdoText As String, Optional cdoAttch As Variant = "")
createMailObject
With iMsg
If IsArray(cdoAttch) Then
For Each thing In cdoAttch
.AddAttachment (thing)
Next
End If
.To = cdoTo
.From = cdoFRom
.Subject = cdoSubject
.TextBody = cdoText
.Send
End With
Set iMsg = Nothing
End Sub
Sub sendWebPage(cdoTo As String, cdoFRom As String, cdoSubject As String,
cdoPage As String, Optional cdoAttch As Variant = "")
createMailObject
With iMsg
With iMsg
If IsArray(cdoAttch) Then
For Each thing In cdoAttch
.AddAttachment (thing)
Next
End If
.To = cdoTo
.From = cdoFRom
.Subject = cdoSubject
.CreateMHTMLBody cdoPage
.Send
.HTMLBody = ""
End With
End With
Set iMsg = Nothing
End Sub
Private Sub Class_Terminate()
Set iMsg = Nothing
End Sub




Why does CDO.Message give me an 8004020f error?

492 requests - last updated Thursday, June 27, 2002

When switching from CDONTS to CDO.Message, when using code like the
following (as described in Article #2026):

<%

sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = Server.CreateObject("CDO.Configuration")

cdoConfig.Fields.Item(sch & "sendusing") = 2

cdoConfig.Fields.Item(sch & "smtpserver") = "<enter_mail.server_here>"

cdoConfig.fields.update

Set cdoMessage = Server.CreateObject("CDO.Message")

Set cdoMessage.Configuration = cdoConfig

cdoMessage.From = "fr**@me.com"

cdoMessage.To = "to@me.com"

cdoMessage.Subject = "Sample CDONTS NewMail"

cdoMessage.TextBody = "This is a test for CDONTS message"

cdoMessage.Send

Set cdoMessage = Nothing

Set cdoConfig = Nothing

%>

You might come across the following error:

error '8004020f'

The event class for this subscription is in an invalid partition

/<file>.asp, line <line>

It is not clear where this error message comes from; it's not even in
Microsoft's Knowledge Base or MSDN Library.

However here are some things you can try to alleviate the problem:

1. Make sure the SMTP server allows anonymous (non-authenticated) relaying.
Otherwise, you'll have to use a

mail component that supports SMTP authentication, like ASPEmail.

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.

3. 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.

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

cdoConfig.Fields.Item(sch & "sendusing") = 2

Becomes

cdoConfig.Fields.Item(sch & "sendusing") = 1



"Hugh Welford" <hu**********@btinternet.com> wrote in message
news:ec**************@tk2msftngp13.phx.gbl...
Hi Using WIN XP and FP2000

Using CDO.message to out put a message from my site, I get the following
error message 8004020f from using the code:-

strsql = "SELECT * FROM details WHERE patid = " & request("to") & ";"
objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic, adcmdtext
thetext = "Hello, " & request("nickto") & " you have a new message on online Connect from " & session("username") & "<br> <a target='_top'
href='http://www.onlineconnect.biz/daters'><big><em><strong>Click here to
log
into the site</strong></em></big></a> then check your messages.<br> Good
luck"

Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "pegasus.intonet.co.uk"
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set.Configuration = cdoConfig
.From = "we*******@onlineconnect.biz"
.To = objrec("emailaddress")
.cc = "ul******@hotmail.com"
.Subject = "New messgage from Online Connect"
.HTMLBody = thetext
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing

any ideas?? thanks in advance Hugh

Jul 19 '05 #2
http://www.aspfaq.com/2305

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
(Reverse e-mail to reply.)

"Hugh Welford" <hu**********@btinternet.com> wrote in message
news:ec**************@tk2msftngp13.phx.gbl...
Hi Using WIN XP and FP2000

Using CDO.message to out put a message from my site, I get the following
error message 8004020f from using the code:-

strsql = "SELECT * FROM details WHERE patid = " & request("to") & ";"
objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic,
adcmdtext

thetext = "Hello, " & request("nickto") & " you have a new message on
online
Connect from " & session("username") & "<br> <a target='_top'
href='http://www.onlineconnect.biz/daters'><big><em><strong>Click here to
log
into the site</strong></em></big></a> then check your messages.<br> Good
luck"

Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "pegasus.intonet.co.uk"
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set.Configuration = cdoConfig
.From = "we*******@onlineconnect.biz"
.To = objrec("emailaddress")
.cc = "ul******@hotmail.com"
.Subject = "New messgage from Online Connect"
.HTMLBody = thetext
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing

any ideas?? thanks in advance Hugh

Jul 19 '05 #3
thanks guys
"Hugh Welford" <hu**********@btinternet.com> wrote in message
news:ec**************@tk2msftngp13.phx.gbl...
Hi Using WIN XP and FP2000

Using CDO.message to out put a message from my site, I get the following
error message 8004020f from using the code:-

strsql = "SELECT * FROM details WHERE patid = " & request("to") & ";"
objrec.open strsql, objconn, adopenforwardonly, adlockoptimistic, adcmdtext
thetext = "Hello, " & request("nickto") & " you have a new message on online Connect from " & session("username") & "<br> <a target='_top'
href='http://www.onlineconnect.biz/daters'><big><em><strong>Click here to
log
into the site</strong></em></big></a> then check your messages.<br> Good
luck"

Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "pegasus.intonet.co.uk"
.Update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
With cdoMessage
Set.Configuration = cdoConfig
.From = "we*******@onlineconnect.biz"
.To = objrec("emailaddress")
.cc = "ul******@hotmail.com"
.Subject = "New messgage from Online Connect"
.HTMLBody = thetext
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing

any ideas?? thanks in advance Hugh

Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Brian Keating EI9FXB | last post by:
Would I be correct in saying that the only way to get a user message into a Windows form would be to use P/Invoke with Message? Of is there some part of the .NET API that I am totally un aware...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
2
by: Microsoft News | last post by:
What I have is a message box that pops up. It is another browser window. The code is a general function that you pass message, title and a key to. The box works great except, that if you are on a...
0
by: ronscottlangham | last post by:
I am working on a custom WCF EndpoingBehavior that will modify the messages coming in and out of my Service. I am having an error related to the modification of the message in the...
2
by: =?Utf-8?B?QWRl?= | last post by:
HI All, I am encountering the following error when I try to send an email through a SMTP server. I believe the problem lies with the authentication part when the network crednetials are used,...
3
by: Steven Allport | last post by:
I am working on processing eml email message using the email module (python 2.5), on files exported from an Outlook PST file, to extract the composite parts of the email. In most instances this...
0
by: Philluminati | last post by:
I have a Perl SOAP Server which returns this SOAP Message when invoked: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http:// www.w3.org/2001/XMLSchema-instance"...
2
by: bernd | last post by:
Hi netties, posted this in a different group already, which seems to be inappropriate. I create a message queue with msgget(), sent a 5-byte message to it with msgsnd() and try to receive the...
2
by: forums_mp | last post by:
Facing a design problem here and I'm not sure how to solve this. The system consists of bi-directional communication between a subject communicating with two (at least for now ) listeners. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.