Skip to main content


generate_mail_raw — generate and send out a message


generate_mail_raw { from_addr } { to_addr | addr_list } { text }


This function generates and sends out a message. It sets the envelope from and to using the addresses given and uses the string contained in the third parameter as the message, including message headers and body. It can send a message to multiple recipients if the second parameter is a string list containing multiple addresses.

$to = "";
$from = "";
generate_mail_raw $from $to text:
From: ${from}
To: ${to}
Subject: a testing email

Was this page helpful?