4.12.1.5 Envelope Modification Functions

Envelope modification functions add or delete recipient addresses from the message envelope. This allows MFL scripts to redirect messages to another addresses.

Built-in Function: void rcpt_add (string address)

Add the e-mail address to the envelope.

Built-in Function: void rcpt_delete (string address)

Remove address from the envelope.

The following example code implements a simple alias-like capability:

 
prog envrcpt
do
   string alias dbget(%aliasdb, $1, "NULL", 1)
   if %alias != "NULL"
     rcpt_delete($1)
     rcpt_add(%alias)
   fi
done