Re: Need an autoresponder when a user fills out my web form
|
Tristan Oeggel |
|
5/30/2008 3:04:36 AM |
Your code looks good, the only thing I would change is the from line:
objCDOSYSMail.From = request("email")
Instead of request("email") use "info@clovertech.com". The reason for this is because some email servers don't allow sending an email from a different domain than the one that your application is running from.
As for the second "thank you" email sent to the user, just create a new CDOSYS object and use it to send whatever you want to the user...
Let me know if you have any questions.
Thanks, Post Comments |
|
This is my existing code.. <% 'Dimension variables Dim objCDOSYSCon 'Create the e-mail server object Set objCDOSYSMail = Server.CreateObject("CDO.Message") Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Out going SMTP server objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.clovertech.com"
objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 objCDOSYSCon.Fields.Update
'Update the CDOSYS Configuration Set objCDOSYSMail.Configuration = objCDOSYSCon objCDOSYSMail.From = request("email") objCDOSYSMail.To = "info@clovertech.com"
objCDOSYSMail.Subject = "Clover Tech Web Form Submission"
objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Business Name: " & request("Business") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Name: " & request("Name") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Email: " & request("email") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Title: " & request("Title") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Address: " & request("Address") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>City: " & request("City") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>State: " & request("State") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Zip: " & request("postCode") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Business Phone: " & request("tel") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Will you purchase compatible cartridges for:" & request("check1") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Have you purchased compatible products in the past? " & request("check2") objCDOSYSMail.HTMLBody = objCDOSYSMail.HTMLBody &"<br>Comments: " & request("comments")
objCDOSYSMail.Send 'Close the server mail object Set objCDOSYSMail = Nothing Set objCDOSYSCon = Nothing %>
Post Comments |
|