$mail = FreePBX::Mail();
$mail->setFrom('myscript&example.com','Test Script');//Optional defaults to sysadmin from email or user@host
$mail->setSubject("This is a test email"); //optional default: Notification from FreePBX
$mail->setTo(array('jsmith@example.com' => 'James Smith', 'tango@example.com'));
$body = 'Spicy jalapeno bacon ipsum dolor amet andouille shoulder burgdoggen cow jowl. Shank ball tip jerky, venison cupim biltong turducken sirloin capicola hamburger';
$mail->setBody($body);
$mail->send(); |