The example below opens the store of
the "natalia" user and creates a rule that will copy all incoming message that
have the "x-test-header" MIME header to a folder named "Test subfolder", which
is a child of the Inbox folder.
|
Derived from:
IDispatch
|
|
Properties |
|
AssignToCategory |
Returns
RDORuleActionAssignToCategory object. Represents an action that
assigns categories to a message. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set Rules = Store.Rules
set Rule = Rules.Create("Test category")
set Action = Rule.Actions.AssignToCategory
Action.Categories = "Auto Category;Redemption"
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Bounce |
Returns
RDORuleActionBounce
object. Represents an action that bounces a message with the specified
bounce code (e.g. bcMessageSizeTooLarge, bcFormsMismatch, bcAccessDenied).
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Test Bounce")
set Action = Rule.Actions.Bounce
Action.BounceCode = &H26 'bcAccessDenied
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
CopyToFolder |
Returns
RDORuleActionMoveOrCopy object. Represents an action that copies a
message to the specified folder.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
on error resume next
err.clear
set SubFolder = Inbox.Folders("Test Subfolder")
if (err.Number <> 0) or (SubFolder Is Nothing) Then
set SubFolder = Inbox.Folders.Add("Test Subfolder")
End If
set Rules = Store.Rules
set Rule = Rules.Create("Test copy to folder")
set Action = Rule.Actions.CopyToFolder
Action.Folder = SubFolder
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Count |
Integer, read-only. Returns
the number of enabled action for the rule.
|
|
Defer |
Returns
RDORuleActionDefer
object. Represents an action that creates a deferred action message to
be later processed by a client side rule. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Test Deferred Action")
set Action = Rule.Actions.Defer
Action.Data = "0000BAD1" ''string representing hex data
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Delete |
Returns
RDORuleAction object.
Represents an action that moves a message to the Deleted Items folder.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Test delete")
set Action = Rule.Actions.Delete
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
DeletePermanently |
Returns
RDORuleAction object.
Represents an action that permanently deletes a message.
Important: do not forget to set the conditions on the parent rule;
otherwise *all* incoming messages will be deleted. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Test delete permanently")
set Action = Rule.Actions.DeletePermanently
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Forward |
Returns
RDORuleActionSend
object. Represents an action that forwards a message to the specified
recipient.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set Rules = Store.Rules
set Rule = Rules.Create("Test forward")
set Action = Rule.Actions.Forward
set Recip = Action.Recipients.Add("dmitry")
Recip.Resolve
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
ForwardAsAttachment |
Returns
RDORuleActionSend
object. Represents an action that forwards a message as an embedded
attachment to the specified recipient. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set Rules = Store.Rules
set Rule = Rules.Create("Test forward as attachment")
set Action = Rule.Actions.ForwardAsAttachment
set Recip = Action.Recipients.Add("dmitry")
Recip.Resolve
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Importance |
Returns
RDORuleActionImportance object. Represents an action that assigned
the specified importance to the message.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Test delete")
set Rule = Rules.Create("Test Importance")
set Action = Rule.Actions.Importance
Action.Importance = olImportanceHigh
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
_Item[Index] |
Returns an action (RDOAction
object) with the specified index (1 through Count).
Default property
|
|
MarkAsRead |
Returns
RDORuleAction object.
Represents an action that marks the message as read.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Rules = Session.Stores.DefaultStore.Rules
set Rule = Rules.Create("Mark As Read Rule 3")
set Action = Rule.Actions.MarkAsRead
Action.Enabled = true
Rule.Save
|
MoveToFolder |
Returns
RDORuleActionMoveOrCopy object. Represents an action that moves a
message to the specified folder.
|
set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
on error resume next
err.clear
set SubFolder = Inbox.Folders("Test Subfolder")
if (err.Number <> 0) or (SubFolder Is Nothing) Then
set SubFolder = Inbox.Folders.Add("Test Subfolder")
End If
set Rules = Store.Rules
set Rule = Rules.Create("Test move to folder")
set Action = Rule.Actions.MoveToFolder
Action.Folder = SubFolder
Action.Enabled = true
Rule.Enabled = true
Rule.Save |
Redirect |
Returns
RDORuleActionSend
object. Represents an action that redirects a message to the specified
recipient. |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set Rules = Store.Rules
set Rule = Rules.Create("Redirect when OOF")
set Action = Rule.Actions.Redirect
set Recip = Action.Recipients.Add("dmitry")
Recip.Resolve
Action.Enabled = true
Rule.Enabled = true
Rule.OnlyWhenOOF = true
Rule.Save
|
Reply |
Returns
RDORuleActionTemplate
object. Represents an action that replies to a message with the
specified template message.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set TemplateMessage = Inbox.HiddenItems.Add
TemplateMessage.Subject = "This is an automated reply"
TemplateMessage.Body = "Automated reply body"
TemplateMessage.MessageClass = "IPM.Note.Rules.ReplyTemplate.Microsoft"
'required!
TemplateMessage.Save
set Rules = Store.Rules
set Rule = Rules.Create("Test Reply")
set Action = Rule.Actions.Reply
Action.TemplateMessage = TemplateMessage
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Sensitivity |
Returns
RDORuleActionSensitivity object. Represents an action that assigned
the specified sensitivity to the message.
|
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Rules = Store.Rules
set Rule = Rules.Create("Test Sensitivity")
set Action = Rule.Actions.Sensitivity
Action.Sensitivity = olConfidential
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
Tag |
Returns
RDORuleActionTag
object. Represents an action that tags (sets the specified property) to
a message |
set Session =
CreateObject("Redemption.RDOSession")
Session.Logon
set Store = Session.Stores.GetSharedMailbox("natalia")
set Inbox = Store.GetDefaultFolder(olFolderInbox)
set Rules = Store.Rules
set Rule = Rules.Create("Test Tag")
set Action = Rule.Actions.Tag
Action.PropTag = &H001A001E 'PR_MESSAGE_CLASS
Action.Value = "IPM.Note.Special"
Action.Enabled = true
Rule.Enabled = true
Rule.Save
|
|
Methods |
|
Item(Index) |
Returns an action (RDOAction
object) with the specified index (1 through Count).
|
|
|