Instantly send email after form is completed

  • Thread starter Thread starter Suzanne
  • Start date Start date
S

Suzanne

Hi,

We have a form that when submitted automatically sends to
our email, but we need help figuring out how to also have
it automatically send an email to the person who
submitted their information to us. Anyone know how to
accomplish this?

Thank you.
 
Suzanne,

I use AspQmail and script via VBS to accomplish this. AspQmail is availble
at http://www.serverobjects.com for about $149.00 or may be already
available on your server (courtesy of your hosting service).

You would shange your form properties to point to the .asp page, retrieve
the form variables on the page and script the mail rcipients, , message,
etc, like the following:

<%@ LANGUAGE=VBScript %>
<%
dim strName
dim strComapny
dim strAddress
dim strCity
dim strState
dim strZip
dim strFAX
dim strPhone
dim strEmail


'<<<<<<<<<<<<<<test for data - rediret to error page if
null>>>>>>>>>>>>>>>>>>>>>>>>
If Request.Form("Name")="" Then
Response.Redirect "error.htm"
Else
'<<<<<<<<<<<<<<<<Retrieve Form info>>>>>>>>>>>>>>>>>
strName=Request.Form("Name")
strCompany=Request.Form("Company")
strAddress=Request.Form("Address")
strCity=Request.Form("City")
strState=Request.Form("State")
strZip=Request.Form("Zip_Code")
strPhone=Request.Form("Phone")
strFAX=Request.Form("Fax")
strEmail=Request.Form("email")

'<<<<<<<<<<<<<<<<<<<<<Set to ASP QMail Mailer>>>>>>>>>>>>>>>>>>>>>>
'>>>>>>>>>>>>>Send to your customer<<<<<<<<<<<<<
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "YOURCOMPANY.com"
Mailer.FromAddress= "(e-mail address removed)"
Mailer.RemoteHost = "YOURHOST.com"
Mailer.Qmessage = "false"
Mailer.AddRecipient strName, strEmail
Mailer.Subject = "YOUR SUBJECT"
Mailer.BodyText = "YOUR TEXT" & YOUR VARIABLE DATA & "YOUR TEXT, ETC"
if Mailer.SendMail then
Set Mailer = Nothing
'>>>>Send to Yourself<<<<<<<<<<
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "YOURCOMPANY.com"
Mailer.FromAddress= "(e-mail address removed)"
Mailer.RemoteHost = "YOURHOST.com"
Mailer.Qmessage = "false"
Mailer.AddRecipient "YOURCOMPANY.com", "(e-mail address removed)"
Mailer.Subject = "YOUR SUBJECT"
Mailer.BodyText = "YOUR TEXT" & YOUR VARIABLE DATA & "YOUR TEXT, ETC"
if Mailer.SendMail then
Set Mailer = Nothing
'>>>>>>>>>>>Confirmation Page<<<<<<<<<<<<<<<<<<
Response.Redirect "thank_you.asp
else
'do nothing
end if
else
Response.Write "Mail send failure. Please contact the webmaster"
end if
Set Mailer = Nothing
end if
%>
 
Not possible when using the FP Form Handler. You would need to use a custom
server-side form handler written in ASP or PHP, etc.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Back
Top