• 0

ASP Contact Form


Question

I am trying to create a contact form that must use ASPEmail.

I have included the form code below. So far I have this working in that it will send me an email when a form is submitted. However, I'm not sure how I make the contents of the form included in the body of the message. I've made serveral different attempts and each one causes the form to break or not include all of the information.

<%
'Begin by discovering which email component your server runs:
dim objMail
set objMail = Server.CreateObject("Persits.MailSender")	'ASPEmail
Dim Fields
Dim realname, email
realname = Request.Form("realnameail = Request.Form("emailobobjMail.Host = "mail.xxx.com" ' Specify a valid SMTP server
objMail.From = Request.Form("emailSpecify sender's address
objMail.FromName = Request.Form("realnamejMail.AddAddress  "[email="xx@xxx.com"]xx@xxx.com[/email]", "Optional Recipient Name" 'Specify recipient
'objMail.AddCC = "[email="someotherrecipient@somedomain.com"]someotherrecipient@somedomain.com[/email]"
objMail.Subject = "Website Message"
objMail.Body =  Request.Form("realnameobobjMail.Body =  Request.Form("emailobobjMail.Body =  Request.Form("addressobobjMail.Body =  Request.Form("cityjMail.IsHTML  = true
objMail.Send
%>
<html>
<head >
</head>
<body>
Success
</body>
</html>

Link to comment
https://www.neowin.net/forum/topic/1029060-asp-contact-form/
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.