dennic
08-29-2003, 03:45 AM
I am only just starting to learn the basics for asp, I have tried to do some code (with some help from a site) for a basic form to email script.
I dont know if i have done it correctly, because it doesnt seem to be working right. I have written the code and saved it as a separate file to the email form.
here is the asp code
'Fields to collect the information
<%
strName = Request.QueryString("Name")
strCompanyName = Request.QueryString("CompanyName")
strEmail = Request.QueryString("Email")
strMobileNumber = Request.QueryString("MobileNumber")
strFaxNumber = Request.QueryString("FaxNumber")
strComments = Request.QueryString("Comments")
%>
'Tells the customer what they have sent
Name: <%= strName %>
Company Name: <%= strCompanyName %>
Email: <%= strEmail %>
Mobile Number: <%= strMobileNumber %>
Fax Number: <%= strFaxNumber %>
Comments: <%= strComments %>
'Sends to info@dennic.com.au
<%
Set objCDOMessage = Server.CreateObject("CDONTS.NewMail")
'Creates the object
objCDO.Message.From = "customer@yahoo.com"
objCDO.Message.To = "info@dennic.com.au"
objCDO.Message.Subject = "Customer Enquiry Form"
objCDO.Message.Body = "The following information is submitted from customer" & vbcrlf &_
"Name:" & strName & vbcrlf &_
"Company Name:" & strCompanyName & vbcrlf &_
"Email:" & strEmail & vbcrlf &_
"Mobile Number:" & strMobileNumber & vbcrlf &_
"Fax Number:" & strFaxNumber & vbcrlf &_
"Comments:" & strComments
'Send the message
objCDOMessage.Send
'Finsh things off
Set objCDOMessgae = Nothing
%>
I think this line is wrong
I dont know if i have done it correctly, because it doesnt seem to be working right. I have written the code and saved it as a separate file to the email form.
here is the asp code
'Fields to collect the information
<%
strName = Request.QueryString("Name")
strCompanyName = Request.QueryString("CompanyName")
strEmail = Request.QueryString("Email")
strMobileNumber = Request.QueryString("MobileNumber")
strFaxNumber = Request.QueryString("FaxNumber")
strComments = Request.QueryString("Comments")
%>
'Tells the customer what they have sent
Name: <%= strName %>
Company Name: <%= strCompanyName %>
Email: <%= strEmail %>
Mobile Number: <%= strMobileNumber %>
Fax Number: <%= strFaxNumber %>
Comments: <%= strComments %>
'Sends to info@dennic.com.au
<%
Set objCDOMessage = Server.CreateObject("CDONTS.NewMail")
'Creates the object
objCDO.Message.From = "customer@yahoo.com"
objCDO.Message.To = "info@dennic.com.au"
objCDO.Message.Subject = "Customer Enquiry Form"
objCDO.Message.Body = "The following information is submitted from customer" & vbcrlf &_
"Name:" & strName & vbcrlf &_
"Company Name:" & strCompanyName & vbcrlf &_
"Email:" & strEmail & vbcrlf &_
"Mobile Number:" & strMobileNumber & vbcrlf &_
"Fax Number:" & strFaxNumber & vbcrlf &_
"Comments:" & strComments
'Send the message
objCDOMessage.Send
'Finsh things off
Set objCDOMessgae = Nothing
%>
I think this line is wrong