Can Someone tell me what I am doing wrong
This is the script on my button
Code:
on (release) {
contact = contactby.getValue();
if (!FirstName.length) {
EmailStatus = "Please Enter your name before Sending";
} else if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
} else if (!company.length) {
EmailStatus = "Please Enter your company name before Sending";
} else if (!phone.length) {
EmailStatus = "Please Enter your phone number before Sending";
} else if (!fax.length) {
EmailStatus = "Please Enter your fax number before Sending";
} else if (!comments.length) {
EmailStatus = "Please enter some text in you message";
} else {
loadVariablesNum("ASPMail.asp", "0", "POST");
EmailStatus = "Sending... one Moment .. or two.. sometimes it's faster then other times";
}
}
This is the ASP code
Code:
<%
FirstName = Request.form("FirstName")
Email = Request.form("email")
Company = Request.form("company")
Phone = Request.form("phone")
Fax = Request.form("fax")
Comments = Request.form("comments")
ContactBy = Request.form("contactby")
strName = "HOME"
strEmail = "home@cwjamaica.com"
strSubject = "testing email"
strBody = FirstName & Email & Company & Phone & Fax & Comments & ContactBy
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "mail.cwjamaica.com"
Mailer.FromName = FirstName
Mailer.FromAddress = Email
Mailer.AddRecipient strName, strEmail
Mailer.Subject = (strSubject)
Mailer.BodyText = strBody
if Mailer.SendMail then
Response.Write "_root.contactus.quatation.emform.EmailStatus=Complete - Your mail has been sent"
else
Response.Write "__root.contactus.quatation.emform.EmailStatus=Failure - Your mail was not sent - errors"
Response.Write Mailer.Response
end if
%>
anyone have any suggestion?