How to program custom actions to apply to rules?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, everyone I would like to know how I can program these actions. Indeed
what I want is to be able to program a rule that will send a BCC of every
sent e-mail to a specified recipient. I would prefer to have it
server-hosted, but it can be client-only.
Well, if anyone knows the answer, let's just try both, because I don't have
a lot of confidence on the server we're using...
Thanks
 
Custom actions are .dll components built with Extended MAPI and C++ or
Delphi in such a way that they can be invoked by Rules Wizard. See
http://www.slipstick.com/addins/custom.htm for code samples and commercial
actions.

If you are using Outlook 2002 or later, you can create a rule with a "run a
script" action that invokes not a "script" but a public VBA subroutine with
a MailItem or MeetingItem argument, e.g.

Public Sub MyRuleScript(ThisMessage as MailItem)
MsgBox "The subject of this message is " & ThisMessage.Subject
' other code to work with ThisMessage
End Sub

See http://www.outlookcode.com/d/code/zaphtml.htm#ol2002 for an example.

The sample code at http://www.outlookcode.com/d/code/autobcc.htm shows how
to add a Bcc recipient using the Application.ItemSend event in Outlook VBA.

A server-based approach would, of course, depend on the capabilities of your
mail server, about which you gave no details.
 
Back
Top