Blank Mail ASP
-
Hi CodeProject , I wrote a javascript to validate the fields on the contact form . But it is working in my system. After deploying in Main server . I am getting BLANK fields values . What is the problem ? This the code
<%@language = "VBscript"%>
<%
set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xyz"
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
Flds.updatedim b
b= "Name : " & Request.Form("Name") & vbCrLf
b= b & "Organisation : " & Request.Form("Organisation")& vbCrLf
b= b & "Title : " & Request.Form("Title")& vbCrLf
b= b & "Address : " & Request.Form("Address")& vbCrLf
b= b & "City : " & Request.Form("City")& vbCrLf
b= b & "Country : " & Request.Form("Country")& vbCrLf
b= b & "Email : " & Request.Form("Email")& vbCrLf
b= b & "Phone : " & Request.Form("Phone")& vbCrLf
b= b & "Interesed in : " & Request.Form("category")& vbCrLf
b= b & "Description : " & Request.Form("Description")& vbCrLfSet objMessage.Configuration = objConfig
objMessage.To ="xyz@gmail.com"
'objMessage.CC ="xyz@xyz.in"
objMessage.From = "info@xyz.in"
objMessage.Subject = "Contact Form - " & Request.Form("Organisation") & vbCrLf
objMessage.TextBody = "High priority - See details below. " & vbCrLf & vbCrLf & bon error resume next
objMessage.Send
if Err.Number <> 0 then
response.Write "Email sending failed: " & Err.Description & ".<br />"&vbcrlf
else
response.redirect("contact_submit.html")
end If
Response.End
set objMessage = nothing
set objConfig = nothing
%>Regards,
For1206
-
Hi CodeProject , I wrote a javascript to validate the fields on the contact form . But it is working in my system. After deploying in Main server . I am getting BLANK fields values . What is the problem ? This the code
<%@language = "VBscript"%>
<%
set objMessage = createobject("cdo.message")
set objConfig = createobject("cdo.configuration")' Setting the SMTP Server
Set Flds = objConfig.Fields
Flds.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "xyz"
Flds.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25
Flds.updatedim b
b= "Name : " & Request.Form("Name") & vbCrLf
b= b & "Organisation : " & Request.Form("Organisation")& vbCrLf
b= b & "Title : " & Request.Form("Title")& vbCrLf
b= b & "Address : " & Request.Form("Address")& vbCrLf
b= b & "City : " & Request.Form("City")& vbCrLf
b= b & "Country : " & Request.Form("Country")& vbCrLf
b= b & "Email : " & Request.Form("Email")& vbCrLf
b= b & "Phone : " & Request.Form("Phone")& vbCrLf
b= b & "Interesed in : " & Request.Form("category")& vbCrLf
b= b & "Description : " & Request.Form("Description")& vbCrLfSet objMessage.Configuration = objConfig
objMessage.To ="xyz@gmail.com"
'objMessage.CC ="xyz@xyz.in"
objMessage.From = "info@xyz.in"
objMessage.Subject = "Contact Form - " & Request.Form("Organisation") & vbCrLf
objMessage.TextBody = "High priority - See details below. " & vbCrLf & vbCrLf & bon error resume next
objMessage.Send
if Err.Number <> 0 then
response.Write "Email sending failed: " & Err.Description & ".<br />"&vbcrlf
else
response.redirect("contact_submit.html")
end If
Response.End
set objMessage = nothing
set objConfig = nothing
%>Regards,
For1206
Looks like VBScript to me not Javascript. Perhaps you might get an answer in the Web forum?