Hi Folks -
My web form calls to cgi-bin/mail.asp and does a great job of sending my form data message text everywhere I want it to go via email.
Problem is, I also want to write (append) just the form field data to a CSV text file. I don't want or need the field names from the form or the other text that gets sent out via email.
Can a FORM have more than one "action/method" call in it?
Can I accomplish this from within my existing script?
Or do I have to have the first script call a second script that parses the form data, adds, commas, opens, appends and closes the file?
The short and simple script that I use now that sends out the email and redirects to a thankyou page is below.
Thanks in advance for any help and/or suggestions you might have,
name = Request.Form ("name")
last_name = Request.Form ("last_name")
city = Request.Form ("city")
state = Request.Form ("state")
from = Request.Form ("from")
comments = Request.Form ("comments")
message = message & "---- Feedback Form ----" & VBCrLF & VBCrLF
message = message & name & " " & last_name & VBCrLf
message = message & city & ", " & state & VBCrLf & VBCrLf
message = message & "Email: " & from & VBCrLf & VBCrLf
message = message & "Feedback: " & VBCrLf
message = message & comments & VBCrLf & VBCrLf
set smtp = Server.CreateObject("Bamboo.SMTP")
' You only need to change the smtp.Rcpt ans smpt.from part to your email address
smtp.Server = "mail.example.com"
smtp.Rcpt = "email@example.com"
smtp.From = from
smtp.FromName = name
smtp.Subject = "replace with subject"
smtp.Message = message
on error resume next
if err then
set smtp = Nothing