PHP Classes
elePHPant
Icontem

Smarty and MIME message integration: Send e-mail messages using Smarty templates

Recommend this page to a friend!
  Info   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2007-05-23 (9 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 1,123 All time: 3,232 This week: 888Up
Version License PHP version Categories
just_send_it 1.0GNU Lesser Genera...5.0Email, PHP 5, Templates
Description Author

This package can be used to compose and send e-mail messages using Smarty templates.

It wraps around Smarty and MIME message class by Manuel Lemos, and prepares the body and headers of the messages to send.

It can set several message options at once passing an array of options values.

Currently it supports options to define HTML or text message template files, the sender, recipient, bounce and reply names and addresses, whether to send messages in plain text, HTML or both, whether to automatically wrap the message text, message character set, and the bulk precedence header to prevent that notification messages be returned due to temporary delivery errors.

Once the message options are set, the class composes and send message according to the specified option values.

Picture of Grigori Kochanov
Name: Grigori Kochanov <contact>
Classes: 7 packages by
Country: Ukraine Ukraine
Innovation award
Innovation award
Nominee: 1x

Details
 ** This is a readme file for the mimemessage and Smarty wrapper **

The script is a wrapper for two packages - "mimemessage" and "Smarty".
To run the scripts you need to download and unpack those packages.

Instructions:

1. Download Smarty from http://smarty.php.net/
and unpack it to the smarty/ directory.

2. Create the smarty/template_c directory and make it writable.
You can also use any directory for the compiled templates by editing 
settings in the 'my_smarty.class.php' file.
Please read the Smarty documentation for more information about
the folder for the compiled templates.

3. Download the "MIME E-mail message sending" package from 
http://www.phpclasses.org/browse/package/9.html
Unpack and place the "email_message.php" file to the same folder with 'mymail.class.php'.
You can also use the 'sendmail_message.php', 'qmail_message.php' or 'smtp_message.php'
instead, which depends on your mail system.
Please read the documentation for more information.

4. Edit the sample scripts and set your email addresses in the 'to_address' field.

Test, use, modify and write your comments.
Thank you!

Author: Grigori Kochanov <public@grik.net>
License: LGPL
Date: May, 20, 2007
URL: http://blog.grik.net/2007/05/easy-professional-emails.html
  Files folder image Files  
File Role Description
Files folder imagetemplates (5 files)
Accessible without login Plain text file readme.txt Doc. Readme file
Accessible without login Plain text file mymail.class.php Class The wrapper for mimemessage and Smarty packages
Accessible without login Plain text file my_smarty.class.php Class Smarty configuration class
Accessible without login Plain text file sample1.php Example sample 1 - send basic email
Accessible without login Plain text file sample2.php Example sample 2 - send HTML email with a few headers
Accessible without login Plain text file sample3.php Example sample 3 - send multipart email
Accessible without login Plain text file sample4.php Example sample 4

  Files folder image Files  /  templates  
File Role Description
  Accessible without login Plain text file sample1.txt.tpl Data template for sample 1
  Accessible without login Plain text file sample2.html.tpl Data template for sample 2
  Accessible without login Plain text file sample3.html.tpl Data template for sample 3
  Accessible without login Plain text file sample3.txt.tpl Data template for sample 3
  Accessible without login Plain text file sample4.tpl Data template for sample 4

Downloadjust_send_it-2007-05-23.zip 7KB
Downloadjust_send_it-2007-05-23.tar.gz 4KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
MIME E-mail message sending Download .zip .tar.gz To send the letter Required
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,123
This week:0
All time:3,232
This week:888Up