Mailtraq - the Complete Email Server

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search


Creates a new user-defined function which must be expressed before being used elsewhere in the script or template. Function definitions can be shared with references to external scripts. Any number of parameters can be passed to the defined function. The parameters are referred to by the placeholders $1, $2, $3, etc, within the function definition. The number of parameters provided by the function call is held in the $0 placeholder. Note that Mailtraq passes parameters by their address not by their value.

Define( function , content )

The name, as a string, of the function being defined
The function expressions. Use the Do() function to bind multiple expressions
// Defines a function which repeats the given 
// string a specified number of times. If a number is not given, the default of '5' is used.

Define("RepeatLine", Do( local_i := If($0 < 2, 5, $2), While(local_i > 0, Do( local_i := local_i - 1, $1 ++ "\n" ) ) ) ); RepeatLine( "Repeated Line", 3); RepeatLine( "Another Repeated Line")
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video


   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.