Forums

ASP

This topic is locked

CDONTS email query

Posted 17 Apr 2003 12:40:15
1
has voted
17 Apr 2003 12:40:15 Davy Fennell posted:
This may be simple to some of you but is foxing me a little. I'm creating a page that allows a visitor to send a feedback email. I have created an email form that uses the POST method to process the email. However, I keep getting the following error with an arrow pointing under the To option:
Microsoft VBScript compilation error '800a03f2'

Expected identifier

/Process_Email.asp, line 11

Dim Email, From, To, Subject, Message, Priority
-----------------^

Also here is the code for the Processing form:
<%
Dim Email, From, To, Subject, Message, Priority

From = Trim(Request.Form("EmailAddress")

To = " "

Subject = Trim(Request.Form("Subject")

Message = Trim(Request.Form("Message")

Priority = 1

If (From <> "" And Message <> "" Then

Set Email = Server.CreateObject("CDONTS.NewMail"

Email.Send From, To, Subject, Message, Priority

Set Email = Nothing

Response.Write "Your suggestion has been sent. Thank you"

Else

Response.Write "Error! Please ensure all the fields on the form are completed. Many thanks."

End If

%>

Many thanks,

Davy
<font size=2></font id=size2><font face='Arial'></font id='Arial'>

Davy

Replies

Replied 17 Apr 2003 16:00:33
17 Apr 2003 16:00:33 panama Evans replied:
I have a page using pure asp and cdonts as well. When I added the cdon'ts script to my page I started getting errors as well. Did you find a solution??

Replied 17 Apr 2003 19:54:00
17 Apr 2003 19:54:00 Davy Fennell replied:
No solution as yet? Any ASP gurus out there hello...helloooo

Davy
Replied 18 Apr 2003 16:01:04
18 Apr 2003 16:01:04 Brent Colflesh replied:
Replied 18 Apr 2003 16:04:34
18 Apr 2003 16:04:34 panama Evans replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
No solution as yet? Any ASP gurus out there hello...helloooo

Davy
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Replied 18 Apr 2003 16:06:28
18 Apr 2003 16:06:28 panama Evans replied:
I recieved this message from a Macromedia member on their forum. Let me know if this helps. I am working on the script as I write this.
Panama
One thing that took me forever to figure out is that the cdonts script needs to execute on the same page as the upload form. I was trying to put it on the resulting "thank you" page.

Add this statement above your cdonts script, which should be below the upload form script:

&lt;%
If (CStr(Request.QueryString("GP_upload") &lt;&gt; "" Then
New_redirectPage = "thankyou.asp"

'then declare your values as normal and use "UploadFormRequest" to retrieve them:

Dim strFirstname, strLastname, strHomephone, strWorkphone, strCellphone, strBody, mail, reply, objMail

strHomephone=UploadFormRequest("HOME_PHONE"
strFirstname=UploadFormRequest("APPLICANT_FIRST"
etc..
etc..
strBody="First Name: "& strFirstname & vbCrLf & _
"Last Name: "& strLastname & vbCrLf & _
etc..
etc..

then after you execute and kill the mail object, you should end with this:

If New_redirectPage &lt;&gt; "" Then
Response.Redirect(New_redirectPage)
End If

End If
%&gt;


Reply to this topic