PHP Classes
elePHPant
Icontem

PHP Mail Queue Class: Add mail messages to a queue to deliver them later

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (46)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2015-09-26 (3 years ago) RSS 2.0 feedNot enough user ratingsTotal: 233 All time: 7,888 This week: 295Up
Version License PHP version Categories
phpeq 1.0.0GNU General Publi...5.0Email, PHP 5, Databases
Collaborate with this project Author
Description

This package can add mail messages to a queue to deliver them later.

There is one class that can compose the definition of a email message with all headers, text or HTML body and a category tag.

The queue class can take the compose messages and inserts them in MySQL database to which it connects using PDO.

The class can also retrieve all queue messages or only those that match a given category up to a given limit, so you can send them with separate script eventually the cron program using the mail function.

The class can also return the count of message pending in the queue.

After sending each message, the class can mark the message as sent so they are removed from the pending queue.

  Performance   Level  
Name: Ovunc Tukenmez <contact>
Classes: 12 packages by
Country: Turkey Turkey
Age: 33
All time rank: 79414 in Turkey Turkey
Week rank: 710 Up12 in Turkey Turkey Up
Innovation award
Innovation award
Nominee: 5x

 

Details
PHP EMAIL QUEUE CLASS (PHPEQ)
PHP Email Queue Class (PHPEQ) is a PHP class that is used to create and manage email queue using MYSQL database.

Add emails to databased queue.
Get emails from queue optionally filtered by category.
It uses MYSQL database for storage.
Easy to implement and all methods are commented.
It decreases page load time by eliminating real time email sending.
Instead of directly sending emails on the transactions, it is possible to insert email message to database using this class.
Emails can be processed later by setting up a cron job.
Example scripts are supplied.

Public Methods of the Queue Class

addMessage()
getEmailCount()
getEmails()
getTableName()
setConnectionDetails()
setMessageIsSent()
setTableName()
All class methods are commented.
Public Methods of the Message Class

getCategory()
getFromEmail()
getFromName()
getHeaders()
getId()
getIsSent()
getMessageHtml()
getMessagePlainText()
getSerializedHeaders()
getSubject()
getTimestampCreated()
getTimestampSent()
getToEmail()
getToName()
setCategory()
setFromEmail()
setFromName()
setHeaders()
setId()
setIsSent()
setMessageHtml()
setMessagePlainText()
setSubject()
setTimestampCreated()
setTimestampSent()
setToEmail()
All class methods are commented.
Documentation

PHP Email Queue Class (PHPEQ) comes with full documentation.
From the installation to the usage you will feel like home.

Class Requirements

PHP 5.2 and above
MySQL 5.0 and above
Folder Structure

All the class files exist in code folder. To get more information about class installation process and usage help, open index.html file from "installation and documentation" folder. "installation and documentation" folder also contains a text file ("database.txt") that contains sql statements in order to create database table structure on your mysql server.

Thanks for downloading this class! If you have improvement idea or bug fix, please feel free to contribute this class.


Ovunc Tukenmez ovunct@live.com
Screenshots  
  • preview2.png
  • preview1.png
  • preview.png
  Files folder image Files  
File Role Description
Files folder imagecode (2 files, 1 directory)
Files folder imageinstallation-and-documentation (2 files, 1 directory)
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file readme.txt Doc. readme

  Files folder image Files  /  code  
File Role Description
Files folder imagePHPEQ (1 directory)
  Accessible without login Plain text file cron_example.php Example Example script
  Accessible without login Plain text file example.php Example Example script

  Files folder image Files  /  code  /  PHPEQ  
File Role Description
Files folder imageclass (3 files)

  Files folder image Files  /  code  /  PHPEQ  /  class  
File Role Description
  Accessible without login Plain text file config-emailqueue.php Conf. Configuration script
  Plain text file PHPEQ.php Class Class source
  Plain text file PHPEQMessage.php Class Class source

  Files folder image Files  /  installation-and-documentation  
File Role Description
Files folder imageassets (2 directories)
  Accessible without login Plain text file database.txt Data database tables
  Accessible without login HTML file index.html Doc. documentation

  Files folder image Files  /  installation-and-documentation  /  assets  
File Role Description
Files folder imageblueprint-css (3 files, 2 directories)
Files folder imageimages (7 files)

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  
File Role Description
Files folder imageplugins (4 directories)
Files folder imagesrc (7 files)
  Accessible without login Plain text file ie.css Data v.1.0.0
  Accessible without login Plain text file print.css Data v.1.0.0
  Accessible without login Plain text file screen.css Data v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  plugins  
File Role Description
Files folder imagebuttons (2 files, 1 directory)
Files folder imagefancy-type (2 files)
Files folder imagelink-icons (2 files, 1 directory)
Files folder imagertl (2 files)

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  plugins  /  buttons  
File Role Description
Files folder imageicons (3 files)
  Accessible without login Plain text file readme.txt Doc. v.1.0.0
  Accessible without login Plain text file screen.css Data v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  plugins  /  buttons  /  icons  
File Role Description
  Accessible without login Image file cross.png Icon v.1.0.0
  Accessible without login Image file key.png Icon v.1.0.0
  Accessible without login Image file tick.png Icon v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  plugins  /  fancy-type  
File Role Description
  Accessible without login Plain text file readme.txt Doc. v.1.0.0
  Accessible without login Plain text file screen.css Data v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  plugins  /  rtl  
File Role Description
  Accessible without login Plain text file readme.txt Doc. v.1.0.0
  Accessible without login Plain text file screen.css Data v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  blueprint-css  /  src  
File Role Description
  Accessible without login Plain text file forms.css Data v.1.0.0
  Accessible without login Plain text file grid.css Data v.1.0.0
  Accessible without login Image file grid.png Icon v.1.0.0
  Accessible without login Plain text file ie.css Data v.1.0.0
  Accessible without login Plain text file print.css Data v.1.0.0
  Accessible without login Plain text file reset.css Data v.1.0.0
  Accessible without login Plain text file typography.css Data v.1.0.0

  Files folder image Files  /  installation-and-documentation  /  assets  /  images  
File Role Description
  Accessible without login Image file p1.png Icon v.1.0.0
  Accessible without login Image file p17.png Icon v.1.0.0
  Accessible without login Image file p18.png Icon v.1.0.0
  Accessible without login Image file p2.png Icon v.1.0.0
  Accessible without login Image file p3.png Icon v.1.0.0
  Accessible without login Image file p4.png Icon v.1.0.0
  Accessible without login Image file p5.png Icon v.1.0.0

 Version Control Unique User Downloads Download Rankings  
 91%
Total:233
This week:0
All time:7,888
This week:295Up