[REBOL] Submitted for your approval, too.
From: edanaii::cox::net at: 5-Aug-2002 19:22
In addition to the first program I submitted, I'd like everyone's
opinion on this script as well. It is one of the main scripts that the
first program uses to process emails. Specifically, this script defines
the Subject line to be matched and the action to be taken.
Once again, please feel free to tear it apart. :)
======================================================================
REBOL [
Title: "Mail Rules for MailBox"
File: %Mail_Rules.r
Date: 2002-06-10
Purpose: {
Defines text in the Subject Line of an email we want to match
and the
acctions to be performed if it occurs.
}
Category: [ CmDataSupport ]
]
if error? error: try [ Object? List.Obj ] [ Do %List.Obj.r ]
if error? error: try [ Object? Mail_Rule.Obj ] [ Do %Mail_Rule.Obj.r ]
if error? error: try [ Object? Rule_Book.Obj ] [ Do %Rule_Book.Obj.r ]
Rule_Book: Make Rule_Book.Obj [
Self/New Make Mail_Rule.Obj [ Subject_Text: "CMAPPP01"
Action: [ Send_It: True ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "CMODSP01"
Action: [ Send_It: True ]
]
; Subject Area Rules
Self/Add Make Mail_Rule.Obj [ Subject_Text: "Data Transport"
Escalation: Outage
Send_To: Make Contact_Group.Obj
[ Self/Add DBDev_Team ]
Action:
[ Letter/Update_To Self/Send_To/Get/eMail ]
Escalation_Action:
[ Letter/Update_To Self/Send_To/Get/Pager ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "ODS to DEX( SQL*Loader )"
Send_To: Make Contact_Group.Obj
[ Self/Add Diana_Bouche ]
Action:
[ Letter/Update_To Self/Send_To/Get/eMail ]
Escalation: Immediate
Escalation_Action:
[ Letter/Update_To Self/Send_To/Get/Pager ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "ODS to APP( Create Party
Data )"
Send_To: Make Contact_Group.Obj
[ Self/Add Pat_Connors ]
Action:
[ Letter/Update_To Self/Send_To/Get/eMail ]
Escalation: Immediate
Escalation_Action:
[ Letter/Update_To Self/Send_To/Get/eMail ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "Vertex to ODS( SQL*Loader )"
Send_To: Make Contact_Group.Obj
[ Self/Add Ed_Dana ]
Action:
[ Letter/Update_To Self/Send_To/Get/eMail ]
Escalation: Immediate
Escalation_Action:
[ Letter/Update_To Self/Send_To/Get/Pager ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "Caution Reset"
Action: [ Cautioned: False ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "Alarm Reset"
Action: [ Alarmed: False ]
]
Self/Add Make Mail_Rule.Obj [ Subject_Text: "Die!"
Action: [ Quit ]
]
]
======================================================================
Thanks again, in advance...
--
Sincerely, | For long you live and high you fly.
Ed Dana | And smiles you'll give and tears you'll cry.
Software Developer | And all you touch and all you see,
1Ghz Athlon Amiga | Is all your life will ever be.
| -- Pink Floyd, Breathe.