Next: , Previous: , Up: Library   [Contents][Index]

5.10 Envelope Modification Functions

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

Built-in Function: void set_from (string email [, string args])

Sets envelope sender address to email, which must be a valid email address. Optional args supply arguments to ESMTP ‘MAIL FROM’ command.

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 uses these functions to implement 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

Next: , Previous: , Up: Library   [Contents][Index]