email-queue

email-queue

include(dirname(__FILE__)."/php-resque/lib/Resque.php");


$start = microtime(true);

$args = array("email" => $_POST["email"];

$id = Resque::enqueue("user:email", "sendEmail", $args);

if( $id === false )
{
        print "adding to the queue failed<p>";
}
else
{
        print "Job ID: ".$id."<p>";
}

$end = microtime(true);
print "<p>Time elapsed in seconds: ".($end - $start);
Comments are closed.