<%@ LANGUAGE="VBScript" %> <% ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' System : StoreFront 2000 Version 4.04.0 ' Date : 1.6.2000 ' Author : LaGarde, Incorporated ' Description : StoreFront Promotional Mail Tool ' Notes : There are no configurable elements in this file. ' ' COPYRIGHT NOTICE ' ' The contents of this file is protected under the United States ' copyright laws as an unpublished work, and is confidential and ' proprietary to LaGarde, Incorporated. Its use or disclosure in ' whole or in part without the expressed written permission of ' LaGarde, Incorporated is expressely prohibited. ' ' (c) Copyright 1998 by LaGarde, Incorporated. All rights reserved. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %> StoreFront Web Store Promo Mailer <% If Not Request("PROMO") = "CUSTOMER" AND Not Request("PROMO") = "MANAGE" Then %>
StoreFront Customer Mailer
Enter the Date Range for the Mailing
Start Date:              Ending Date:              
Subject: 
From: 
Enter the Mail Message
Manage Subscribers
Remove Customer From Mailing List
Customer EMail Address:
<% ElseIf Request("PROMO") = "CUSTOMER" Then %> <% StartDate = Request("Start_Date")&" 12:00:01 AM" EndDate = Request("End_Date")&" 11:59:59 PM" DSN_Name = Session("DSN_Name") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open DSN_Name SQL = "SELECT MAIL_SERVER, MAIL_METHOD, PRIMARY_EMAIL, SECONDARY_EMAIL FROM admin" Set RSAdmin = Connection.Execute(SQL) MailServer = Trim(RSAdmin("MAIL_SERVER")) MailMethod = Trim(RSAdmin("MAIL_METHOD")) SendMail_C = "CustomerMail" Set RSAdmin = nothing SQLStmt = "SELECT Distinct(E_MAIL), NAME " SQLStmt = SQLStmt & "FROM Customer WHERE (((ORDER_DATE >= " SQLStmt = SQLStmt & "#" & StartDate & "#) AND " SQLStmt = SQLStmt & "(ORDER_DATE <= #" & EndDate & "#)) AND MAIL_SUBSCRIBED = '1') " Set RSMail = Connection.Execute(SQLStmt) Do While NOT RSMail.EOF CR = Chr(10) & Chr(13) If InStr(RSMail("E_MAIL"),"@") Then SUBJECT = Request("Subject") PRIMARY = Request("Mail_From") CUSTOMER = Trim(RSMail("E_Mail")) BODY2 = "Dear " & RSMail("Name") & "," & CR & CR BODY2 = BODY2 & Request("Mail_Message") & CR LoadMail = DoMail End If RSMail.MoveNext Loop %> Mail Report
<% RSMail.MoveFirst Do While NOT RSMail.EOF %> <% RSMail.MoveNext Loop Connection.Close Set Connection = Nothing ElseIf Request("PROMO") = "MANAGE" Then DSN_Name = Session("DSN_Name") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Open DSN_Name SQL = "UPDATE customer SET MAIL_SUBSCRIBED = '0' WHERE E_MAIL = '"& Trim(Request("EMAIL_ADDRESS")) &"' " Set RSSub = Connection.Execute(SQL) %> <% End If %>
Mail Report
The following message was sent to the customers listed below for the period <%= Request("Start_Date") %> through <%= Request("End_Date") %>.
<%= Request("Mail_Message") %>
<%= RSMail("Name") %> <%= RSMail("E_Mail") %>
Mail List Update Report
Customer <%= Request("EMAIL_ADDRESS") %> removed from mailing list.