<% if session("email")="" then response.write "Session time out after 20 minutes of non-activity. Sorry. Please log in again." else %>

Return to Member Main Menu

<% ' Declare our variables: Dim objCDO ' Our CDO object Dim strSendTo ' Strings to hold our email fields Dim strFrom Dim strSubject Dim strBody dim strCC strCC="" Dim strBCC dim strEmailAddresses strEmailAddresses="" strSendTo = Request.Form("txtSendTo") if request.form("txtFrom")="" then strFrom=session("email") else strFrom=Request.Form("txtFrom") & "<" & session("email")& ">" end if if request.form("txtSubject")="" then strSubject="RS" else strSubject = Request.Form("txtSubject") end if strBody = "

" & Request.Form("txtBody") strBody=Replace(strBody,chr(13),"

") 'return, linefeed=10 strBody=strBody & "

" if len(trim(request.form("txtSendTo")))=0 then else strCNX = "Provider=SQLOLEDB; Data Source=ipsqtw0024atl2.registeredsite.com; Initial Catalog=rosescharlincom; " _ & "User Id=user1123349; Password=ik2465zgjy;" set objCD = Server.CreateObject("ADODB.Connection") objCD.ConnectionTimeout = 15 objCD.CommandTimeout = 30 objCD.open strCNX set objRec = Server.CreateObject("ADODB.Recordset") strSQL="SELECT DISTINCT e_mail_addr " strSQL=strSQL & "FROM tblRSUsers " select case strSendTo case "Board" strSQL=strSQL & "WHERE board_member='Y' " case "Board and teachers" strSQL=strSQL & "WHERE board_member='Y' or board_position='Teacher' or board_position='Teacher/Director' " case "Teachers" strSQL=strSQL & "WHERE board_position='Teacher' or board_position='Teacher/Director' " case "President" strSQL=strSQL & "WHERE board_position='President' " case "Treasurer" strSQL=strSQL & "WHERE board_position='Treasurer' " case "Secretary" strSQL=strSQL & "WHERE board_position='Secretary' " case "Program" strSQL=strSQL & "WHERE board_position='Program' " case "Membership" strSQL=strSQL & "WHERE board_position='Membership' " case "Fundraising" strSQL=strSQL & "WHERE board_position='Fundraising' " case "Maintenance" strSQL=strSQL & "WHERE board_position='Maintenance' " case "Coop Council" strSQL=strSQL & "WHERE board_position='Coop Council' " case "LARS" strSQL=strSQL & "WHERE LARS='I' OR LARS='C'" case "All Members" end select objRec.open strSQL, objCD, 0, 1 'response.write "strSendto: " & strSendto if not ObjRec.eof then objRec.movefirst if strSendTo="LARS" then do while not objRec.eof ' if trim(objRec("LARS"))="C" then strEmailAddresses=strEmailAddresses & trim(objRec("e_mail_addr")) & "," ' else ' strCC=strCC & trim(objRec("e_mail_addr")) & "," ' end if objRec.movenext loop else do while not objRec.eof strEmailAddresses=strEmailAddresses & trim(objRec("e_mail_addr")) & "," objRec.movenext loop end if numLength=len(trim(strEmailAddresses)) strEmailAddresses=left(strEmailAddresses,numLength-1) 'response.write "strEmailAddresses: " & strEmailAddresses end if objRec.close end if set objCD = nothing If strEmailAddresses = "" then Else ' Send our message: ' Note that I'm using the Win2000 CDO and not CDONTS! ' As such it will only work on Win2000. Set objCDO = Server.CreateObject("CDO.Message") With objCDO .To = strEmailAddresses .From = strFrom .Subject = strSubject .HtmlBody = strBody .CC = strCC .BCC = strBCC ' BEFORE YOU UNCOMMENT THIS CHANGE THE VALUE OF ' strFrom ABOVE! IF YOU CAN'T FIND IT SEARCH FOR ' strFrom = "User Name " ' THANK YOU. .Send End With Set objCDO = Nothing Response.Write "MESSAGE SENT" End If %>

From:
To:
Subject:
Message:
<% end if %>