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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'800a000d' = Type mismatch

Status
Not open for further replies.

rakishoner

Technical User
Aug 22, 2002
36
US
Please help!!
Thanks...

============================================================
Microsoft VBScript runtime error '800a000d'

Type mismatch
============================================================


For i = 1 to Request.Form("Topic").Count
set objMail = CreateObject("CDONTS.NewMail")
TempInterest = TempInterest & Request.Form("Topic").Item(i) & " "
DistribSQL = DistribSQL & " or CIInterests.InterestName = '" _
& Request.Form("Topic").Item(i) & "' "
set RSEmailResponses = conn.execute ("select * from CIInterests " _
& " where InterestName = '" & Request.Form("Topic").Item(i) & "'")
objMail.Send RSEmailResponses("RespondTo"),Request.Form("EmailAddress"),_
RSEmailResponses("MessageSubject"),cstr(RSEmailResponses("MessageText"))

set objmail = nothing
Next

1367.gif
 
Don't you need an "&" on the next line after "_" ?


For i = 1 to Request.Form("Topic").Count
set objMail = CreateObject("CDONTS.NewMail")
TempInterest = TempInterest & Request.Form("Topic").Item(i) & " "
DistribSQL = DistribSQL & " or CIInterests.InterestName = '" _
& Request.Form("Topic").Item(i) & "' "
set RSEmailResponses = conn.execute ("select * from CIInterests " _
& " where InterestName = '" & Request.Form("Topic").Item(i) & "'")
objMail.Send RSEmailResponses("RespondTo"),Request.Form("EmailAddress"),_
& RSEmailResponses("MessageSubject"),cstr(RSEmailResponses("MessageText"))
set objmail = nothing
Next
www.vzio.com
ASP WEB DEVELOPMENT



 
Microsoft VBScript compilation error '800a03ea'

Syntax error

/protest/process.asp, line 66

& RSEmailResponses("MessageSubject"),cstr(RSEmailResponses("MessageText"))
^

 
If needed here is the entirety of the code.

============================================================

<%

if isempty(Request.Form(&quot;SubmitRequest&quot;)) then
TheMessage1 = &quot;Thank you for your interest in our comunity. <BR> &quot; _
& &quot;Please use the form below to submit your questions or comments. &quot;
TheMessage2 = &quot;Note that fields with <font color='ff0000'>*</font> are required.&quot;
else
TheName = Request.Form(&quot;Name&quot;)
TheEmailAddress = Request.Form(&quot;EmailAddress&quot;)
TheCity = Request.Form(&quot;City&quot;)
TheState = Request.Form(&quot;State&quot;)
TheZip = Request.Form(&quot;Zip&quot;)
TheCountry = Request.Form(&quot;Country&quot;)
TheMessage = Request.Form(&quot;Message&quot;)

if isempty(Request.Form(&quot;Name&quot;))or Request.Form(&quot;Name&quot;) = &quot;&quot; then
TheMessage1 = &quot;The form was not submitted.&quot;
TheMessage2 = &quot;Name is required!&quot;
elseif isempty(Request.Form(&quot;EmailAddress&quot;)) or Request.Form(&quot;EmailAddress&quot;) = &quot;&quot; then
TheMessage1 = &quot;The form was not submitted.&quot;
TheMessage2 = &quot;Email Address is required!&quot;
elseif instr(Request.Form(&quot;EmailAddress&quot;),&quot;@&quot;) = 0 then
TheMessage1 = &quot;The form was not submitted.&quot;
TheMessage2 = &quot;Email Address is invalid!&quot;
elseif instr(Request.Form(&quot;EmailAddress&quot;),&quot;.&quot;) = 0 then
TheMessage1 = &quot;The form was not submitted.&quot;
TheMessage2 = &quot;Email Address is invalid!&quot;
else


set conn = server.createobject (&quot;adodb.connection&quot;)
conn.open &quot;comments&quot;, &quot;xxxx&quot;, &quot;xxxx&quot;

TheMessage1 = &quot;Thank you for using this form.&quot;

TheMessage2 = &quot;It has been submitted!&quot;

EmailMessage = &quot;H1BProtest.com, request for more information details:&quot; & chr(13) & chr(13)
EmailMessage = EmailMessage & &quot;Name: &quot; & TheName & chr(13)
EmailMessage = EmailMessage & &quot;Email Address: &quot; & TheEmailAddress & chr(13)
EmailMessage = EmailMessage & &quot;City: &quot; & TheCity & chr(13)
EmailMessage = EmailMessage & &quot;State: &quot; & TheState & chr(13)
EmailMessage = EmailMessage & &quot;Zip: &quot; & TheZip & chr(13)
EmailMessage = EmailMessage & &quot;Country: &quot; & TheCountry & chr(13)
EmailMessage = EmailMessage & &quot;Message: &quot; & TheMessage & chr(13)


DistribSQL = &quot;SELECT CIMoreInfoRequestDistributees.EmailAddress &quot; _
& &quot;FROM CIMoreInfoRequestDistributees INNER JOIN &quot; _
& &quot;CIInterestDistributionList ON CIMoreInfoRequestDistributees.DistributeeID &quot; _
& &quot;= CIInterestDistributionList.DistributeeID LEFT OUTER JOIN &quot; _
& &quot;CIInterests ON &quot; _
& &quot;CIInterestDistributionList.InterestID = CIInterests.InterestID &quot; _
& &quot;WHERE CIInterestDistributionList.InterestID = 1 &quot;


For i = 1 to Request.Form(&quot;Topic&quot;).Count
set objMail = CreateObject(&quot;CDONTS.NewMail&quot;)
TempInterest = TempInterest & Request.Form(&quot;Topic&quot;).Item(i) & &quot; &quot;
DistribSQL = DistribSQL & &quot; or CIInterests.InterestName = '&quot; _
& Request.Form(&quot;Topic&quot;).Item(i) & &quot;' &quot;
set RSEmailResponses = conn.execute (&quot;select * from CIInterests &quot; _
& &quot; where InterestName = '&quot; & Request.Form(&quot;Topic&quot;).Item(i) & &quot;'&quot;)
objMail.Send RSEmailResponses(&quot;RespondTo&quot;),Request.Form(&quot;EmailAddress&quot;),_
RSEmailResponses(&quot;MessageSubject&quot;),cstr(RSEmailResponses(&quot;MessageText&quot;))
set objmail = nothing
Next

if right(TempInterest,2) = &quot;, &quot; then
TempInterest = left(TempInterest, len(TempInterest) - 2 )
end if
EmailMessage = EmailMessage & &quot;Topic: &quot; & TempInterest & chr(13)

set RSDistrib = conn.execute (DistribSQL)
do until RSDistrib.eof
set objMail = CreateObject(&quot;CDONTS.NewMail&quot;)
objMail.Send Request.Form(&quot;Email&quot;),RSDistrib(&quot;EmailAddress&quot;), _
&quot;New More Info Request!&quot;,cstr(EmailMessage)
set objmail = nothing
RSDistrib.MoveNext
loop
conn.Execute &quot;insert into CIMoreInfoRequests (DateTimeRequested, Name, &quot; _
& &quot;EmailAddress, City, State, Zip, &quot; _
& &quot;Topic, Message) values (&quot; _
& &quot;'&quot; & Now() & &quot;', &quot; _
& &quot;'&quot; & TheName & &quot;', &quot; _
& &quot;'&quot; & TheEmailAddress & &quot;', &quot; _
& &quot;'&quot; & TheCity & &quot;', &quot; _
& &quot;'&quot; & TheState & &quot;', &quot; _
& &quot;'&quot; & TheZip & &quot;', &quot; _
& &quot;'&quot; & TheCompany & &quot;', &quot; _
& &quot;'&quot; & TempInterest & &quot;', &quot; _
& &quot;'&quot; & TheMEssage & &quot;')&quot; _

end if
end if
%>

============================================================
1367.gif
 
Try a space after the comma &quot;), _

Im not seeing any other problem with your code, this is a wierd one.
www.vzio.com
ASP WEB DEVELOPMENT



 
OK I have made things alot simpler. I still have a problem though. The code seems to go off with out a hitch but I never get an email.

Any suggestions?

============================================================

<%
Set Themail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
TheMessage = &quot;From: &quot; & Request.Form(&quot;Name&quot;) & vbnewline &_
Request.Form(&quot;Message&quot;)
if Request.Form(&quot;Topic&quot;) = &quot;Pages&quot; then
TheMail.Send Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
elseif Request.Form(&quot;Topic&quot;) = &quot;Content&quot; then TheMail.Send Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
elseif Request.Form(&quot;Topic&quot;) = &quot;Catagories&quot; then TheMail.Send Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
elseif Request.Form(&quot;Topic&quot;) = &quot;Layout&quot; then TheMail.Send Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
end if
Set Themail = Nothing
%>
 
I really, can't help you on the cdnots part, I have never used cdnots, I use dynu to send mail, and never had a problem with it.

www.vzio.com
ASP WEB DEVELOPMENT
 
you are missing fields....the body, to, from are all needed
<%
Set Themail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
myMail.From=&quot;sales@somewhere.com&quot;
myMail.To=&quot;you@somewhere.com&quot;

TheMessage = &quot;From: &quot; & Request.Form(&quot;Name&quot;) & vbcrlf & Request.Form(&quot;Message&quot;)

if Request.Form(&quot;Topic&quot;) = &quot;Pages&quot; then
TheMail.Body = Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
TheMail.Send

elseif Request.Form(&quot;Topic&quot;) = &quot;Content&quot; then
TheMail.Body = Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
TheMail.Send

elseif Request.Form(&quot;Topic&quot;) = &quot;Catagories&quot; then
TheMail.Body = Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
TheMail.Send

elseif Request.Form(&quot;Topic&quot;) = &quot;Layout&quot; then
TheMail.Body = Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage
TheMail.Send

end if
Set Themail = Nothing
%> Sometimes starting over can fix a problem at the end

admin@onpntwebdesigns.com
 
possibly the subject is also needed. never tried it without one.

TheMail.Subject = &quot;New Mail&quot; Sometimes starting over can fix a problem at the end

admin@onpntwebdesigns.com
 
This is from my Bad mail folder with the code from post 6.

X-Receiver: xxxx@yahoo.com
To: <xxxx@yahoo.com>
Subject: Catagories
Date: Sat, 7 Sep 2002 16:47:54 -0400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

From: Kent Williams
Want to see more of them.


What is X-Receiver:

============================================================

I used the code mentioned:


Code:
 <%
DIM Message
DIM Topic
DIM Pages
DIM Content
DIM Catagories
DIM Layout
 
Set Themail = Server.CreateObject(&quot;CDONTS.NewMail&quot;)
Themail.From=&quot;Email&quot;
Themail.To=&quot;xxxx@yahoo.com.com&quot;

TheMessage = &quot;From: &quot; & Request.Form(&quot;Name&quot;) & vbnewline & Request.Form(&quot;Message&quot;)

if Request.Form(&quot;Topic&quot;) = &quot;Pages&quot; then 
TheMail.Body Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage_
TheMail.Send 

elseif Request.Form(&quot;Topic&quot;) = &quot;Content&quot; then
TheMail.Body Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage_
TheMail.Send 

elseif Request.Form(&quot;Topic&quot;) = &quot;Catagories&quot; then
TheMail.Body Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage_
TheMail.Send 

elseif Request.Form(&quot;Topic&quot;) = &quot;Layout&quot; then
TheMail.Body Request.Form(&quot;Email&quot;), &quot;xxxx@yahoo.com&quot;,Request.Form(&quot;Topic&quot;), TheMessage_
TheMail.Send 

end if
Set Themail = Nothing
%>

This is the error that I recieved.

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'Themail.Body'


============================================================

Thanks
comp.gif


1367.gif
 
Additional error info.

============================================================

Unable to deliver this message because the follow error was encountered: &quot;Error is processing file in pickup directory.&quot;.

The specific error code was 0xC00402CE.
 
I got it!!

Thanks for the help
cheers.gif



============================================================

E-mail Messages Generated by CDONTS Go Directly to Badmail Folder
The information in this article applies to:
Microsoft Internet Information Server 4.0, 5.0
Collaboration Data Objects (CDO) for NTS 1.2

Symptoms
When you use Collaboration Data Objects for Windows NT Server (CDONTS) to create e-mail messages from a component or components in Active Server Pages (ASP), the e-mail messages that CDONTS generates go directly to the Badmail folder. The e-mail messages do not queue up in the Queue folder, and no records appear in the SMTP log.

The .bdr file in the Badmail folder with the .bad file may contain the following information:

... Error is processing file in pickup directory.
... The specific error code was 0xC00402CE.Cause

The &quot;From: ...&quot; line does not appear in the header section of these e-mail messages. A message must contain at least three parts: From, To, and Message Data.

Resolution
To correct this behavior, modify the code to add the .From attribute before you send the e-mail.

First Published: Mar 5 2002 10:56PM
Keywords: kbprb IIS CDONTS SMTP BADMAIL

============================================================
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top