/**
     * 
     * Simple email send function.
     * 
     * NOTE: mail() function is not suitable for larger volumes of email 
     *       in a loop because opens and closes an SMTP socket for each email, 
     *       which is not very efficient. Better alternatives:
     * - PHPMailer: https://github.com/PHPMailer/PHPMailer
     * - PEAR::Mail: http://pear.php.net/package/Mail
     * - PEAR::Mail_Queue: http://pear.php.net/package/Mail_Queue
     * 
     * For HTML formated (MIME) emails it is best to use:
     * - PEAR::Mail_Mime: http://pear.php.net/package/Mail_Mime
     * 
     * 
     * Parameters
     * -------------------------------------------------------------------------
     * to: recipient email
     * from: sender email
     * to_name: recipient name
     * from_name: sender name
     * replyto: Reply-To header email
     * replyto_name: Reply-To name
     * subject: email subject
     * body: email message body
     * envelope: sender envelope email
     * charset: email codification charset (UTF-8 by default)
     * mailer: email X-Mailer header (phpversion by default)
     * mime: true to codify subject and body as mime (true by default)
     * 
     * @param array $opt email parameters
     * @return boolean|array true if email sent, array with messages if error
     */

 

Ejemplo:

$_opt = array();
$_opt['to'] = "destino@example.com";
$_opt['to_name'] = "Pedro Picapiedra";
$_opt['from'] = "web@example.com";
$_opt['from_name'] = "Formulario de prueba";
$_opt['replyto'] = "ventas@dominio.tld";
$_opt['replyto_name'] = "Formulario web";
$_opt['subject'] = "Mensaje de prueba áéíóú";
$_opt['body'] = "Hola, soy una alegre y divertida prueba";
$wv->emailSend($_opt);

Si se pone un echo delante de la llamada a la función, devuelve datos de depuración.