示例#1
0
<?php

require_once 'handlers/Mailing.php';
/*
*  TESTING CODEE!!
*  
*/
$subject = 'Test mailing';
$body = 'test body';
$address = array('*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**', '*****@*****.**');
$mailing = new Mailing($address);
$mailing->subject = 'Test mailing';
$mailing->body = 'test body';
if ($mailing->is_init) {
    echo 'Sending emails...<br>';
    $report = $mailing->send();
    echo 'Emails sent!<br>';
    echo 'Additional information:<br>';
    echo $mailing->getErrorMessage();
    var_dump($report);
} else {
    echo $mailing->getErrorMessage() . '<br>';
}