<% 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 %> Art Gallery YouChi Mixed Media Contact Us
Home Featured Artist Contact Us
Art Gallery Youchi
Art Gallery Youchi
Art Gallery Youchi
Art Gallery Youchi
Art Gallery Youchi
Send Mail To:
Your Name
Your Email
Your WebSite
(if applicable)
Subject
Your Message
info@artgalleryyouchi.com
cherylthrasher@artgalleryyouchi.com
70 Edgewood Ave. Toronto, Ont., Canada M4L 3H1
Art Gallery You Chi
Art Gallery
 Web Optimization © 2002 art gallery you chi© Toronto | Ontario | Canada. All rights reserved Valid HTML 4.01!Valid CSS!
Art Gallery
Art Gallery
Toronto Search Engine Optimization by Toronto Web Services    
<% 'Close the database connections and destroy the recordsets oConn.Close Set rsMail = Nothing %>