<%@ Language=VBScript %> <% 'Creates the mail object Set mailer = nothing Set Mailer = Server.CreateObject("Persits.MailSender") 'put your from name from your mail form here. Mailer.FromName = Request("name") 'put your from address from your mail form here. Mailer.From= Request("kim@mcg.net") 'This is the mail server to send the mail through do not modify unless you know what you are doing! Mailer.Host = "mail.mcg.net" 'This is your main address that you are sending to. Mailer.Addaddress "kim", "kim@mcg.net" 'Mailer.Addaddress "kent", "kent@mcg.net" 'if you want a "cc" or a "bcc" you can put it here 'Mailer.Addbcc "Brent", "brent.peterson@d4data.com" 'pbassett@infinitydirect.com Mailer.Addcc "kim", "kim@mcg.net" 'This will set the content of you email message to HTML Mailer.IsHtml = true 'Put your subject here, if you want the subjust to come from you form you need to do request("subject") without the "" Mailer.Subject = "CHAT Web Form" 'This is the body of your message, if you use isHTML = true then you can use HTML in your body and it will not show up on your email message, 'if you have it set to false, then you may not use html in your body of you message. 'For more lines of text, the Request("feild") section has to match the name of your input feild on your form that you are submitting. 'It also has to be inside "&" if you want to mix your input fields with HTML. Mailer.Body = "Name: " & Request("name") &_ "
Address: " & Request("streetaddress") &_ "
City: " & Request("city") &_ "
State: " & Request("state") &_ "
ZIP: " & Request("zip") &_ "
Home Phone: " & Request("phone2") &_ "
Work Phone: " & Request("phone3") &_ "
Cell Phone: " & Request("phone4") &_ "
Email Address: " & Request("email") &_ "
Person Inquiring For: " & request("inquiring") &_ "
Questions: " & request("questions") &_ 'This is the part that send the mail message. IT IS IMPORTANT. if Mailer.Send then 'you can put a redirect here, for example, if you want to redirect on sucess, then you would put 'Response.Redirect("thankyou.html") Response.Redirect(request("redirect")) Response.Write "Mail sent..." else 'You can do the same thing here for errors. or your can leave this so you know what the error is! Response.Write "Mail send failure. Error was " & Mailer.Response end if 'You can email brent@d4data.com or call 952-545-2020 with questions or comments. %>