<% ' ************************************************************************** ' FILE NAME: WebMail.asp ' PURPOSE: Lets visitor send an e-mail to webmaster ' AUTHOR: Altair Technology, Inc., O R Rodriguez ' CHANGE BY: O R Rodriguez, 1.1.2002 ' REVISIONS: ' ************************************************************************** 'Copyright (c) 2002 Altair Technology, Inc. All rights reserved. option explicit %> <% ' define objects dim objConnection dim rsTemp Dim arrAttachments(0) dim varComments dim varEntry dim varUserMessage dim varMailSubject dim varMailMessage dim varEMail dim lngRows dim strTemp dim lngWPID ' Clear prior errors err.clear 'on error resume next varEntry = "" varUserMessage = "" varEMail = "" varComments = "" varEntry = Request.QueryString("Action") if Request.QueryString("WPID") <> "" then session("WPID") = Request.QueryString("WPID") lngWPID = Request.QueryString("WPID") end if lngWPID = session("WPID") '************************************************************************************** ' This section establishes database connection '************************************************************************************** if Not OpenConnection then Response.Redirect Application("ErrorRedirect") end if '************************************************************************************** ' This section saves the new user info in people table '************************************************************************************** if varEntry = "Save" then ' **************************************************************** ' send e-mail to store operator ' **************************************************************** varMailSubject = "This visitor submitted the MichaelHolubCustomHomes.com contact us form" varMailMessage = "Name: " & Request.Form("Name") & vbCrLf & _ "Comments made were: " & Request.Form("Comments") & vbCrLf & _ "Phone: " & Request.Form("Phone") & vbCrLf & _ "Email: " & Request.Form("Email") ' check for distribution if Application("EMailCC") = "" then ' SendEmail(MailFrom, MailTo, Subject, CC, BCC, Text, HTML, Attachment) SendEmail Application("EMailInfo"), Application("EMailInfo"), varMailSubject, null, null, _ varMailMessage, Null, Null else SendEmail Application("EMailInfo"), Application("EMailInfo"), varMailSubject, Application("EMailCC"), null, _ varMailMessage, Null, Null end if ' **************************************************************** ' Add e-mail to Mailings Table ' **************************************************************** strTemp = "select * from Mailings where Email = '" & Request.Form("Email") & "'" set rsTemp = objConnection.Execute(strTemp) if rsTemp.eof then strTemp = "insert into Mailings (Company, PeopleID, MC1,MC2,MC3,MC4,MC5,Email,MailingsStatus,DateIn)" & _ " values(" & cint(Application("StoreID")) & ",0,1,0,0,0,0,'" & Request.Form("Email") & "',0,'" & date & "')" objConnection.Execute(strTemp) end if rsTemp.close ' **************************************************************** ' send e-mail to Visitor ' **************************************************************** SendEmail Application("EMailInfo"), Request.Form("Email"), Application("MailSubject"), null, null, _ Application("MailMessage"), Null, arrAttachments varUserMessage = "

Your information has been forwarded to us. Thank you.

" end if 'response.write "here2" 'response.End() %> <% response.write varUserMessage ' Start of Mail Form response.write "
" response.write "" if Application("VisitorName") > 0 then response.write "" response.write "" response.write "" response.write "" else response.write "" response.write "" end if if Application("VisitorTelephone") > 0 then response.write "" response.write "" response.write "" response.write "" else response.write "" response.write "" end if if Application("VisitorEmail") > 0 then response.write "" response.write "" response.write "" response.write "" else response.write "" response.write "" end if response.write "" response.write "" response.write "" response.write "
Your Name" response.write "" response.write "" response.write "
Telephone" response.write "" response.write "" response.write "
e-Mail Address" response.write "" response.write "" response.write "
" response.write "" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "
" response.write "" ' "
" response.write "
" ' End of Registration form Form '************************************************************** %>