Hello,
I cant seem to get this script to work to send out an email for the contact us form for the following is the code on my button to submit
on (release) {
//Goto Webpage Behavior
getURL("contactmail.asp","_blank", "GET");
//End Behavior
}
and here is the asp script:
<%
Subject = Request.form("contactSubject")
Email = Request.form("contactEmail")
ContactName = Request.form("contactName")
ToComments = Request.form("contactMessage")
strName = "The Harty House Doctor"
strEmail = "danhaydenjr@gmail.com"
strSubject = Subject
strBody = ContactName & ToComments
Set objErrMail= Server.CreateObject("CDO.Message")
With objErrMail
.From = Email
.To = strEmail
.Subject = strSubject
.HTMLBody = CStr("" & strBody)
.Configuration.Fields.Item (" = 2
.Configuration.Fields.Item(" = "localhost"
.Configuration.Fields.Item(" = 25
.Configuration.Fields.Update
On Error Resume Next
.Send
End With
If Err.Number <> 0 Then
Response.Write "_root.Mail.EmailStatus=Failure - Your mail was not sent -" & error
Response.Write Mailer.Response
else
Response.Write "_root.Mail.EmailStatus=Complete - Your mail has been sent"
End If
On Error Goto 0
%>
What could be wrong here? does anyone know? Please help me out. thank you.
dan
I cant seem to get this script to work to send out an email for the contact us form for the following is the code on my button to submit
on (release) {
//Goto Webpage Behavior
getURL("contactmail.asp","_blank", "GET");
//End Behavior
}
and here is the asp script:
<%
Subject = Request.form("contactSubject")
Email = Request.form("contactEmail")
ContactName = Request.form("contactName")
ToComments = Request.form("contactMessage")
strName = "The Harty House Doctor"
strEmail = "danhaydenjr@gmail.com"
strSubject = Subject
strBody = ContactName & ToComments
Set objErrMail= Server.CreateObject("CDO.Message")
With objErrMail
.From = Email
.To = strEmail
.Subject = strSubject
.HTMLBody = CStr("" & strBody)
.Configuration.Fields.Item (" = 2
.Configuration.Fields.Item(" = "localhost"
.Configuration.Fields.Item(" = 25
.Configuration.Fields.Update
On Error Resume Next
.Send
End With
If Err.Number <> 0 Then
Response.Write "_root.Mail.EmailStatus=Failure - Your mail was not sent -" & error
Response.Write Mailer.Response
else
Response.Write "_root.Mail.EmailStatus=Complete - Your mail has been sent"
End If
On Error Goto 0
%>
What could be wrong here? does anyone know? Please help me out. thank you.
dan