Hi all,
I have an email form which is then processed using the script below. This works fine but I also receive 2 extra blank emails each time along with the correct email. Does anyone know a possible cause for this?
<%
Dim strName
Dim strTel1
Dim strTel2
Dim strEmail
Dim strEnquiry
Dim emailtxt
Dim CDONTSMail
strName = Request.Form.Item("name")
strTel1 = Request.Form.Item("dayphone")
strTel2 = Request.Form.Item("evephone")
strEmail = Request.Form.Item("email")
strEnquiry = Request.Form.Item("enquiry")
Set CDONTSMail = Server.CreateObject("CDONTS.NewMail")
CDONTSMail.From = "user@host.com"
CDONTSMail.To = "user@host.com"
CDONTSMail.Subject = "Online Enquiry"
emailtxt = "Name : " & strName & vbCrLf _
& "Daytime Tel : " & strTel1 & vbCrLf _
& "Evening Tel : " & strTel2 & vbCrLf _
& "Email Address : " & strEmail & vbCrLf & vbCrLf _
& "Enquiry : " & vbCrLf & strEnquiry
CDONTSMail.Body = emailtxt
CDONTSMail.BodyFormat = 1
CDONTSMail.MailFormat = 0
CDONTSMail.Send
set CDONTSMail = nothing
%>
Thanks very much,
Dan
I have an email form which is then processed using the script below. This works fine but I also receive 2 extra blank emails each time along with the correct email. Does anyone know a possible cause for this?
<%
Dim strName
Dim strTel1
Dim strTel2
Dim strEmail
Dim strEnquiry
Dim emailtxt
Dim CDONTSMail
strName = Request.Form.Item("name")
strTel1 = Request.Form.Item("dayphone")
strTel2 = Request.Form.Item("evephone")
strEmail = Request.Form.Item("email")
strEnquiry = Request.Form.Item("enquiry")
Set CDONTSMail = Server.CreateObject("CDONTS.NewMail")
CDONTSMail.From = "user@host.com"
CDONTSMail.To = "user@host.com"
CDONTSMail.Subject = "Online Enquiry"
emailtxt = "Name : " & strName & vbCrLf _
& "Daytime Tel : " & strTel1 & vbCrLf _
& "Evening Tel : " & strTel2 & vbCrLf _
& "Email Address : " & strEmail & vbCrLf & vbCrLf _
& "Enquiry : " & vbCrLf & strEnquiry
CDONTSMail.Body = emailtxt
CDONTSMail.BodyFormat = 1
CDONTSMail.MailFormat = 0
CDONTSMail.Send
set CDONTSMail = nothing
%>
Thanks very much,
Dan