PHP Classes

File: queue.php

Recommend this page to a friend!
  Classes of solomongaby   Newsletter Queue   queue.php   Download  
File: queue.php
Role: Application script
Content type: text/plain
Description: file trigered by cron
Class: Newsletter Queue
Queue newsletters in MySQL for delivering later
Author: By
Last change: bug removal
Date: 16 years ago
Size: 504 bytes
 

Contents

Class file image Download
<?php
$moduleRoot
=dirname(__FILE__);
require(
$moduleRoot.'/class.phpmailer.php');
require(
$moduleRoot.'/class.newsletter.php');
require(
$moduleRoot.'/easy-mysql-class.php');

$mysql= new mysql('localhost' , 'mysqlUser', 'mysqlPass', 'mysqlDB' );
$mysql->connect();

$newsletter= new newsletter();
$newsletter->addMysqlObg($mysql);

$sendAttempt=$newsletter->Sendmail();
if (
$sendAttempt===false) echo $newsletter->errorMsg;
else {
    echo
$newsletter->emailSent.' mailuri trimise.';
}

?>