W
whyyyy
The script below works fine if the form is filled out and submitted.
But a (blank) e-mail is sent whenever the page loads, even when the form is
not submitted. I would like to receive the e-mail only when the form is
submitted
<%@LANGUAGE="VBSCRIPT"%>
<%
Set MyMail=CreateObject("CDO.Message")
MyMail.TextBody=Request.Form("name") & vbCrLf & _
Request.Form("email")& vbCrLf & _
Request.Form("phone")& vbCrLf & _
Request.Form("palaver")
MyMail.From=" (e-mail address removed)"
MyMail.To="(e-mail address removed)"
MyMail.Cc=""
MyMail.Bcc=""
MyMail.Subject="cosas de cuero"
MyMail.Send()
Set MyMail=Nothing
%>
Part two: The script below could be part of the problem. It is in the html
body below the closing form tag </form> and works when the form is submitted,
but I would prefer not to use it, but instead to have a redirect to a
confirmation page.
But if I use "response.redirect", the page with the form never opens. Only
the confirmation page opens.
So I have two questions, and am obviously a novice.
This forum has been a lifesaver in the past
Thanks
Alan Lipman
(e-mail address removed)
(e-mail address removed)
<%
dim email
email=Request.Form("email")
If email<>"" Then
Response.Write("Hello " & email & "!<br />")
Response.Write("We have receved your submission")
End If
%>
But a (blank) e-mail is sent whenever the page loads, even when the form is
not submitted. I would like to receive the e-mail only when the form is
submitted
<%@LANGUAGE="VBSCRIPT"%>
<%
Set MyMail=CreateObject("CDO.Message")
MyMail.TextBody=Request.Form("name") & vbCrLf & _
Request.Form("email")& vbCrLf & _
Request.Form("phone")& vbCrLf & _
Request.Form("palaver")
MyMail.From=" (e-mail address removed)"
MyMail.To="(e-mail address removed)"
MyMail.Cc=""
MyMail.Bcc=""
MyMail.Subject="cosas de cuero"
MyMail.Send()
Set MyMail=Nothing
%>
Part two: The script below could be part of the problem. It is in the html
body below the closing form tag </form> and works when the form is submitted,
but I would prefer not to use it, but instead to have a redirect to a
confirmation page.
But if I use "response.redirect", the page with the form never opens. Only
the confirmation page opens.
So I have two questions, and am obviously a novice.
This forum has been a lifesaver in the past
Thanks
Alan Lipman
(e-mail address removed)
(e-mail address removed)
<%
dim email
email=Request.Form("email")
If email<>"" Then
Response.Write("Hello " & email & "!<br />")
Response.Write("We have receved your submission")
End If
%>