PHP Classes

File: code/example.php

Recommend this page to a friend!
  Classes of Ovunc Tukenmez   PHP Mail Queue Class   code/example.php   Download  
File: code/example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Mail Queue Class
Add mail messages to a queue to deliver them later
Author: By
Last change: v.1.0.0
Date: 8 years ago
Size: 650 bytes


Class file image Download

// instantiate the message queue
$queue = new PHPEQ();

// create a new PHPEQMessage object
$new_message = new PHPEQMessage();
$new_message->setFromName('SENDER NAME');
$new_message->setToName('RECIPIENT NAME');
$new_message->setSubject('test subject');
$new_message->setMessageHtml('<b>TEST MESSAGE</b>');
$new_message->setMessagePlainText('TEST MESSAGE');
$new_message->setHeaders(array()); // optional
$new_message->setCategory('category 1'); // optional

// add message to queue