% Dim varName, varEmail, varCompany, varEnquiry varName = Request.Form("NameEB") varEmail = Request.Form("Email") varCompany = Request.Form("CompanyEB") varEnquiry = Request.Form("EnquiryEB") %> <% ' Dim the variables we are going to use for this example Dim objMail Dim strTo Dim strsubject Dim strMessage strMessage = "This email contains the form contents that were submitted" & vbCRLF & vbCRLF strMessage = strMessage & "Name: " & varName & vbCRLF & vbCRLF strMessage = strMessage & "Email: " & varEmail & vbCRLF & vbCRLF strMessage = strMessage & "Company: " & varCompany & vbCRLF & vbCRLF strMessage = strMessage & "Enquiry: " & varEnquiry & vbCRLF Dim rsMail Dim oConn 'If the user presses the submit button, get the information from the form and send the emails If Request.Form("btnSend").Count > 0 Then 'Get the stuff from the form strTo = Request.Form("sendmailto") strsubject = Request.Form("subject") 'Create the CDO object and pass it the values for the email Set objMail = Server.CreateObject("CDONTS.NewMail") objMail.To = strTo objMail.From = "form@tws.com" objMail.Subject = strsubject objMail.Body = strMessage 'Send the email and destroy the mail object objMail.Send Set objMail = Nothing 'Redirect to the thankyou page Response.Redirect("thankyou.html") Response.End End If 'Open a connection to the database Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "DSN=art" 'Get the emails from the database so that we can use them to populate the listbox Set rsMail = oConn.Execute("select * from operators") 'Loop through the subscribers and build the select box contents While Not rsMail.Eof strOptions = strOptions & "" & VbCrlf rsMail.MoveNext Wend %>
![]() |
![]() |
![]() |
![]() |
|
|
|
|
|||||
| Toronto Search Engine Optimization by Toronto Web Services |