<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Restrict Access To Page: Grant or deny access to this page MM_authorizedUsers="" MM_authFailedURL="login.asp" MM_grantAccess=false If Session("MM_Username") <> "" Then If (true Or CStr(Session("MM_UserAuthorization"))="") Or _ (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then MM_grantAccess = true End If End If If Not MM_grantAccess Then MM_qsChar = "?" If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&" MM_referrer = Request.ServerVariables("URL") if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString() MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer) Response.Redirect(MM_authFailedURL) End If %> <% dim preview, mailSent If Request.Form("submit") <> "" And Request.Form("submit") <> "Cancel" Then Session("messageTyped") = CStr(Request.Form("emailText")) Session("messageBody") = "The following message was sent by " & Session("from_Name") & " (" & Session("from_Address") & ") via the PBB Members' Area Website." & vbcrlf Session("messageBody") = Session("messageBody") & "www.prairiebrass.org/membersarea" & vbcrlf & "---------------------------------" & vbcrlf & vbcrlf Session("messageBody") = Session("messageBody") & CStr(Request.Form("emailText")) Session("messageSubj") = CStr(Request.Form("subject")) If Request.Form("submit") = "Send Email" Then If Session("messageTyped") <> "" And Session("messageSubj") <> "" Then Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item(cdoSendUsingMethod) = cdoSendUsingPort .Item(cdoSMTPServer) = "smtp1.easycgi.com" .Update End With Set cdoMessage = CreateObject("CDO.Message") With cdoMessage Set .Configuration = cdoConfig .From = Session("from_Name") & " " .To = "lothianh@ameritech.net" '.To = Session("AddressString") .ReplyTo = Session("from_Name") & " <" & Session("from_Address") & ">" .Subject = Session("messageSubj") .TextBody = Session("messageBody") .Send End With Set cdoMessage = Nothing Set cdoConfig = Nothing preview = "" Session("messageTyped") = "" Session("messageBody") = "" Session("messageSubj") = "" Session("from_Name") = "" Session("from_Address") = "" mailSent = "1" Else preview = "1" End If ElseIf Request.Form("submit") = "Preview Email" Then preview = "1" End If ElseIf Request.Form("submit") = "Cancel" Then preview = "" Session("messageTyped") = "" Session("messageBody") = "" Session("messageSubj") = "" Session("from_Name") = "" Session("from_Address") = "" End If %> <% Dim emailSource__MMColParam emailSource__MMColParam = "1" If (Session("MM_Username") <> "") Then emailSource__MMColParam = Session("MM_Username") End If %> <% Dim emailSource Dim emailSource_numRows Set emailSource = Server.CreateObject("ADODB.Recordset") emailSource.ActiveConnection = MM_PBBMember_STRING emailSource.Source = "SELECT FirstName, LastName, Email FROM RosterNew WHERE ID = " + Replace(emailSource__MMColParam, "'", "''") + "" emailSource.CursorType = 0 emailSource.CursorLocation = 2 emailSource.LockType = 1 emailSource.Open() emailSource_numRows = 0 Session("from_Name") = (emailSource.Fields.Item("FirstName").Value) & " " & (emailSource.Fields.Item("LastName").Value) Session("from_Address") = (emailSource.Fields.Item("Email").Value) %> <% Dim MemEmail__MMColParam MemEmail__MMColParam = "Active" If (Request("MM_EmptyValue") <> "") Then MemEmail__MMColParam = Request("MM_EmptyValue") End If %> <% Dim MemEmail Dim MemEmail_numRows Set MemEmail = Server.CreateObject("ADODB.Recordset") MemEmail.ActiveConnection = MM_PBBMember_STRING MemEmail.Source = "SELECT FirstName, LastName, Email FROM RosterNew WHERE Status = '" + Replace(MemEmail__MMColParam, "'", "''") + "' AND Email Is Not Null" MemEmail.CursorType = 0 MemEmail.CursorLocation = 2 MemEmail.LockType = 1 MemEmail.Open() MemEmail_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 MemEmail_numRows = MemEmail_numRows + Repeat1__numRows %> <% Dim BuildAddress While ((Repeat1__numRows <> 0) AND (NOT MemEmail.EOF)) 'BuildAddress = BuildAddress + "'" + (MemEmail.Fields.Item("FirstName").Value) + " " + (MemEmail.Fields.Item("LastName").Value) + "<" +(MemEmail.Fields.Item("Email").Value) + ">; " If BuildAddress <> "" Then BuildAddress = BuildAddress + "; " + (MemEmail.Fields.Item("Email").Value) Else BuildAddress = BuildAddress + (MemEmail.Fields.Item("Email").Value) End If Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 MemEmail.MoveNext() Wend Session("AddressString") = BuildAddress 'Session("AddressString") = "lothianh@ameritech.net; lothian@usopenbrass.org" %> PBB Members' Area - Send Email <% If mailSent <> "" Then %> <% End If %>
 
Members' Area >> Send an Email to the PBB Roster

<% If mailSent <> "" Then %> <% mailSent = "" Else %> <% If preview = "1" Then If Session("messageTyped") <> "" And Session("messageSubj") <> "" Then %> <% Else %> <% End If End If %> <% End If %>

Email All Members


Your message has been sent.

Instructions: Type or cut-and-paste the subject and text of your email below. When you are done, click on the Preview button to check your message for errors or click on the Send button to send the message to all active PBB members.

Warning: When you click "Send Email" the message is immediately sent to the entire roster. You will no longer be able to edit or cancel the email.

Message Preview

From: <%=Session("from_Name") & " <" & Session("from_Address") & ">"%>

To: <%=Session("AddressString") %>

Subject: <%=Session("messageSubj")%>


<%=replace(Session("messageTyped"),vbcrlf,"
")%>


To edit this email, enter your changes below.
Message Preview

Your message must include a subject line and text or it will not be sent.

To edit this email, enter your changes below.
From: <%=Session("from_Name") & " <" & Session("from_Address") & ">"%> "%>" name="from">
To: PBB Member List " name="to">
Date: <%=Date()%>
Subject: ">
Message Text:
    

Alternatively, click on the link below. This will open your default email program and create a new message with the "To:" field filled with the addresses of all current PBB members. When you are done composing your message, just send it the same way you normally would.

Note: Not all internet software supports this feature. If you do not use a separate email application (such as Outlook, Outlook Express, Eudora, etc.) this feature may not work for you.


">Click Here to email the entire PBB roster

 

<% emailSource.Close() Set emailSource = Nothing %> <% MemEmail.Close() Set MemEmail = Nothing %>