<%@LANGUAGE="VBSCRIPT"%> <% If Request.Form("SendEMail_btn") <> "" then Server.ScriptTimeout = 180 'Specified in seconds - thus, 3 minutes. DIM BeginAt, I, EndAt BeginAt = Now() set rsEMail = Server.CreateObject("ADODB.Recordset") rsEMail.ActiveConnection = MM_connSIG_STRING '############################################################################################# 'From the following list, uncomment back in 8>) one query, depending on whom you wanna contact. 'Leave the other queries commented back out. 'This should be converted to a dropdown or set of radio buttons so that it can be picked 'dynamically from the environment - 4-Sept-03 by MA '############################################################################################# rsEMail.Source = "SELECT Email FROM qryActiveUsersEMail" 'ALL Active Users ' rsEMail.Source = "SELECT Email FROM qryRecentRegsNoRSVP" 'Recent registratns who have not RSVPed - Uses param ' rsEMail.Source = "SELECT Email FROM qryNoRSVP" 'ALL Active Users who have not RSVPed ' rsEMail.Source = "SELECT Email FROM qryRSVPed" 'Users who have RSVPed - to send reminder / directions ' rsEMail.Source = "SELECT Email FROM qryAttended" 'Users who attended current meeting - to send thank you / follow-up ' rsEMail.Source = "SELECT Email FROM qryAttendedPreviousMeeting" 'Users who attended previous meeting - MeetingID hard-coded in query ' rsEMail.Source = "SELECT Email FROM qryAttendedSince" 'Users who attended at least one meeting since . . . ' rsEMail.Source = "SELECT Email FROM qryRecentRegOrAttend" 'Users who have RSVPed OR registered recently rsEMail.CursorType = adForwardOnly rsEMail.CursorLocation = adUseServer rsEMail.LockType = adLockOptimistic rsEMail.Open() rsEMail_numRows = 0 Response.Write "
" & BeginAt & "
"'************************ 'Who the e-mail is From strSender = Request.Form("from") ' The Subject of the e-mail strSubject = Request.Form("subject") 'The Body of the e-mail message strBody = Request.Form("body") 'The e-mails Importance - - "1"=Normal, "2"="High", "0"=Low strImportance = "1" Do While NOT rsEMail.EOF 'Iterate through resordset 'To whom the email is sent strEmail = rsEMail.Fields.Item("Email").Value Set objCDO = Server.CreateObject("CDONTS.NewMail") objCDO.To = strEmail objCDO.From = strSender 'odjCDO.bcc = objCDO.Subject = strSubject objCDO.Body = strBody 'objCDO.Importance = strImportance ' Special note: to specify an attachment, use a backslash as path delimiter 'objCDO.AttachFile = "D:\BAADMMUG\Attachments\Attachment.txt" objCDO.Send 'send off the email ! Set objCDO = Nothing rsEMail.MoveNext I = I + 1 If (I MOD 10) = 0 Then Response.Write "
" & Now() & ": " & I End If LOOP EndAt = Now() '********************Response.Redirect "default.asp" Response.Write I & "
" & EndAt & "
" '******************** rsEMail.Close Set rsEMail = Nothing END IF %>