PC Review


Reply
Thread Tools Rate Thread

database and e-mail

 
 
=?Utf-8?B?cm1s?=
Guest
Posts: n/a
 
      12th Nov 2005
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 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.
 
Reply With Quote
 
 
 
 
p c
Guest
Posts: n/a
 
      13th Nov 2005
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.


rml wrote:
> 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 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.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail database Need Incoming Mail Database Microsoft Access Getting Started 4 4th Feb 2010 08:52 AM
E-mail an entire database? =?Utf-8?B?WWFlbA==?= Microsoft Access Getting Started 17 19th Jul 2007 08:33 PM
E-mail database =?Utf-8?B?V2Fsa21hbg==?= Microsoft Outlook 6 28th May 2007 11:17 AM
e-mail database Jim Microsoft Access 1 21st Feb 2004 12:12 AM
How do you a mail message to everyone in your mail database Mike Felix Microsoft Outlook 1 8th Jan 2004 03:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:32 AM.