Multiple functions called from "Always Looked Up Last"

Joey Trungale joeyt at VICTORIACOLLEGE.EDU
Thu Dec 2 15:57:02 GMT 2004


Hello,

I found this to be useful, so I thought I would share it.

If you need to call more than one function using the "Always Looked Up
Last" setting, you can use something like this...

In MailScanner.conf use:

Always Looked Up Last = &Wrapper

In CustomConfig.pm add:

sub InitWrapper {
  InitFunction1();
  InitFunction2();
}

sub EndWrapper {
  EndFunction1();
  EndFunction2();
}

sub InitWrapper {
  # Of course if the function you are calling does not
  # need the message, don't pass it.
  my($message) = @_;
  Function1($message);
  Function2($message);
}
--
-----------------------------
Joey Trungale
Computer Tech
Victoria College
2200 E Red River
Victoria, TX 77901
361.573.3291

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list