<%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : send Email ' Product : CandyPress Store Frontend ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com '************************************************************************* Option explicit Response.Buffer = true const adminLevel = 1 %> <% 'Email dim emailFrom dim emailTo dim emailToName dim emailSubj dim emailBody 'Database dim mySQL, cn, rs '************************************************************************* 'Open Database Connection call openDB() 'Store Configuration if loadConfig() = false then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Could not load Store Configuration settings.") end if 'Close Database Connection call closedb() %>

Send Email

<% 'Pre-Populate some fields emailTo = trim(request.QueryString("emailTo")) emailToName = trim(request.QueryString("emailToName")) emailSubj = trim(request.QueryString("emailSubj")) emailBody = trim(request.QueryString("emailBody")) if len(emailBody) = 0 then emailBody = "" _ & "TO : " & emailToName & vbCrLf &vbCrLf _ & "RE : " & emailSubj & vbCrLf end if 'Are we returning to this page with a message? if len(trim(Request.QueryString("msg"))) > 0 then %> <%=Request.QueryString("msg")%>

<% end if 'Send email via user's email client if mailComp = "0" then %>
The store is currently configured NOT to send email via an email component from the web server. To enable web based email for this store, configure your email server and component in your store's configuration settings. <% if len(emailTo) > 0 then %>

You can also send an email to the address below with your regular Email Client software (eg. Outlook Express, Eudora, etc.).

Click Email Address : <%=emailTo%> <% end if %>

<% 'Send email via an email component else %>
From Email
To Email
Subject
Message
  Send as HTML Email
Send copy to "From" address


<% end if %>