database and e-mail

R

rml

I have an asp page which posts to a access database. I would also like to
have an e-mail sent as well. I found this code which should send an e-mail.
I'm not sure if I placing it in the right spot. Can someone explain where,
exactly I should place this code.

I'm not sure exactly where they mean. Below is the instructions I got with
the code.


Insert the script into the HTML view AFTER the confirmation fields of your
confirmation asp page.
Here's the script;

<%
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.To = "(e-mail address removed)"
objCDOMail.From = ""
objCDOMail.Subject = FP_SavedFields("Name")
For Each item in FP_SavedFields
strBody = strBody & item & ": " & FP_SavedFields(item) & VbCrLf
Next
objCDOMail.Body = strBody
objCDOMail.BodyFormat = 1
objCDOMail.MailFormat = 1
objCDOMail.Send
Set objCDOMail = Nothing
%>

Thanks.
 
P

p c

Per your siyrce, in your confirmation page, switch to the HTML/code view
and "Insert the script into the HTML view AFTER the confirmation fields
of your confirmation asp page."

By the way the piece of code rilies on "CDONTS" to send the email. I
will work in WINT4 servers but not in "standard" installations of WIN2k
or 2003 server. You will need to use CDO iansted of CDONTS.

Do a google search for "sending email with CDO" w/o quotes and change
the code accordingly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top