Form Results as an Email and to a database?

Results 1 to 2 of 2

Thread: Form Results as an Email and to a database?

  1. #1
    Andrew Watson Guest

    Default Form Results as an Email and to a database?

    How can I send the results of a form to a list of email recipients and to a database.<BR><BR>Thanks for any help.

  2. #2
    Join Date
    Dec 1969

    Default RE: Form Results as an Email and to a database?

    This is only a part answer...the email part. I don&#039t know what database you are using to help you with the other part. I use CDO for NT Server for email. You have to have SMTP running on the server for this to work (just a matter of turning it to "on"). The only thing you need to change is the sender/sendee info and the subject below. The rest can stay the same, it is generic. Note: this doesn&#039t have any form validation, you should include that to avoid garbage form input.<BR>&#060;% <BR>Dim TheFormField<BR>Dim TheMessage<BR>For Each TheFormField in Request.Form<BR>If TheFormField &#060;&#062; "SubmitButton" Then<BR>If Request.Form(TheFormField).Count &#062; 1 Then<BR>TheMessage = TheMessage & TheFormField & "(" _<BR>& Request.Form(TheFormField).Count & "): " _<BR>& Request.Form(TheFormField) & chr(13)<BR>Else<BR>TheMessage = TheMessage & TheFormField & ": " _<BR>& Request.Form(TheFormField) & chr(13)<BR>End If<BR>End If<BR>Next<BR>Dim objMail<BR>Set objMail = CreateObject("CDONTS.NewMail")<BR>objMail.Send "address_of_sender", "address_of_recipient", <BR>"subject_line", cstr(TheMessage)<BR>Set objMail = Nothing<BR>End If<BR>%&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts