Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error when submitting a form through CDO

Status
Not open for further replies.

avivit

Technical User
Jul 5, 2000
456
IL
Hi,

I have some forms, that are submitted to mail through CDO component.
They are sent by using an asp page that contain the following code.
Frequently, submitting one of these forms results in error msg, and afterwards it works again, and vica versa.
Sometimes it can work from one pc but not from another.
It is not stable.
Why is that?
*****************The error message"********
'error type 0x8004020E, "Cannot modify or delete an object that was added using the COM+ Admin SDK'.
********************************************
The "problematic" line is where "objEmail.Send()" code is


****The code*********
<%
Response.Buffer = True
Dim strbody 'Email body
Dim strSubject 'Email subject
strSubject=request.form("Subject")

strBody = "Subject: </b>" & strSubject
strBody = strBody & "<br><br><b>Name: </b>" & Request.form("Name")
strBody = strBody & "<br><br><b>Phone: </b>" & Request.form("Phone")
strBody = strBody & "<br><br><b>Department: </b>" & Request.form("Department")
strBody = strBody & "<br><br><b>E-mail: </b>" & Request.form("email")

set objEmail = CreateObject("CDO.Message")
Dim strfrom
strfrom=request.form("email") 'Sender Email address
objEmail.From = strfrom
Dim strto
strto=request.form("recipient")
objEmail.To=strto
objEmail.Subject = strSubject
objEmail.HTMLbody = strbody 'Send Email in HTML format, otherwise change to objEmail.textbody = strbody

objEmail.Configuration.Fields.Item _
(" = 2
objEmail.Configuration.Fields.Item _
(" = "home server"
objEmail.Configuration.Fields.Item _
(" = 25

objEmail.Configuration.Fields.Update()
objEmail.Send()
Set objEmail = Nothing
%>
<html><head></head><body>

<center>Thank you for sending this form</center>

</body></html>
*********Thanks**********
 
Thanks for searching an answer.

I found that too, before opening the thread,
but no answer there actually.

Besides, that person has a permanent problem,
and in my case it works once and then it doesn't.
And this is how it is in all pcs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top