Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Adreanne
Starting Member
9 Posts |
Posted - 2007-05-08 : 09:32:10
|
I would like to modify the following code to send emails to a specific person based on an option they select on the form. Can you please help the form is as follows: <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><% myMessage = _ " Name: " & Request.Form("firstName") & " " & Request.Form("lastName") & vbcrlf & _ " Company: " & Request.Form("company") & vbcrlf & _ " E-mail: " & Request.Form("email1") & vbcrlf & _ " Phone: " & Request.Form("phone") & vbcrlf & _ "Comment/Question: " & Request.Form("comment") & vbcrlf sDateOriginated = CStr(Now) sRemoteAddr = Request.ServerVariables("REMOTE_ADDR") sBrowser = Request.ServerVariables("HTTP_USER_AGENT") sWebURL = Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL") sServerName = Request.ServerVariables("SERVER_NAME") sFileName = Request.ServerVariables("PATH_INFO") myMessage = myMessage & vbcrlf & vbcrlf & _ "*** FOR INTERNAL PURPOSES ONLY ***" & vbcrlf & _ "DATE ORIGINATED: " & sDateOriginated & vbcrlf & _ " REMOTE_ADDR: " & sRemoteAddr & vbcrlf & _ " BROWSER: " & sBrowser & vbcrlf & _ " WEB URL: " & sWebURL & vbcrlf & _ " SERVER NAME: " & sServerName & vbcrlf & _ " FILE PATH: " & sFileName ' Send the message Set objCDO = Server.CreateObject("CDO.Message") objCDO.To = "Documanger@premiereglobal.com" objCDO.Bcc = "" objCDO.From = "do_not_reply@premiereglobal.com (Premiere Global Services)" objCDO.Subject = "Contact Us request from website 'About Us' page" objCDO.TextBody = myMessage objCDO.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'Name or IP of remote SMTP server objCDO.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _ ="mail.premiereglobal.com" 'Server port objCDO.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _ =25 objCDO.Configuration.Fields.Update objCDO.Send Set objCDO = Nothing Response.Redirect("/contact-us/about-us-thank-you.asp") %> The option are as follows:<Select name="product"> <option selected>-- Please Choose a Product -- </option> <option value="Care">Customer Care Center</option> <option value="Reservations">Reservations</option> <option value="Billing">Billing Helpdesk</option> </select> |
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
|
|