PHP Classes

PHP Template Based Notification Emails: Send email notifications using templates

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 59%Total: 536 All time: 5,618 This week: 104Up
Version License PHP version Categories
tpl-notifications 0.5MIT/X Consortium ...3.0Email, PHP 5, Templates
Description 

Author

This class can send email notifications using templates.

It can read a given message template file and process it by replacing template parameters passed in an array.

The class can send the composed template message to a given email address using the PEAR mail package.

Picture of Richard Carson
  Performance   Level  
Name: Richard Carson <contact>
Classes: 4 packages by
Country: Canada Canada
Age: 32
All time rank: 200348 in Canada Canada
Week rank: 164 Up7 in Canada Canada Up

Recommendations

Send emails fast
I need to send many emails

Example

<?php
   
include('notifications.class.php');

   
$parameters = array(
       
'target_email' => 'example@change.this',
       
'my_email' => 'example@change.this',
       
'event' => 'test',
       
'time' => date('M jS Y g:i A')
    );
   
notifications::notify('example_template', $parameters);
?>


Details

To use this, first configure your email server settings in config.php Next, create your email templates (example template at templates/example.tpl) See example.php for example usage smtp.interface.php has all functions fully documented. Requires PEAR Mail!

  Files folder image Files (7)  
File Role Description
Files folder imagetemplates (1 file)
Accessible without login Plain text file config.php Conf. Configuration
Accessible without login Plain text file example.php Example Example usage
Accessible without login Plain text file LICENSE Lic. License file
Plain text file notifications.class.php Class Main class
Accessible without login Plain text file README Doc. Documentation
Plain text file smtp.interface.php Class Class interface

  Files folder image Files (7)  /  templates  
File Role Description
  Accessible without login Plain text file example.tpl Data example template

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:536
This week:0
All time:5,618
This week:104Up
User Ratings User Comments (2)
 All time
Utility:75%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:59%StarStarStar
Rank:1339
 
This is a good and useful class ;-)
10 years ago (José Filipe Lopes Santos)
80%StarStarStarStarStar
I like to say that this package have insufficient file becaus...
10 years ago (ashish)
57%StarStarStar