PHP Classes

File: sample2.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Grigori Kochanov  >  Smarty and MIME message integration  >  sample2.php  >  Download  
File: sample2.php
Role: Example script
Content type: text/plain
Description: sample 2 - send HTML email with a few headers
Class: Smarty and MIME message integration
Send e-mail messages using Smarty templates
Author: By
Last change:
Date: 8 years ago
Size: 809 bytes


Class file image Download
require_once "my_smarty.class.php";

 * To send an HTML letter you should create a template for the letter with the ".html.tpl" extension
 * in the Smarty template folder
 * Also, I define the different "Reply-To" and a charset

$options = array(
'template'=>'sample2', //no extension here - the type of the letter is determined by file extension
'to_name'=>'Grigori Kochanov',
'from_name'=> 'Joe Black',
'from_address'=> '',
'reply_name'=> 'Mr. Death',
'reply_address'=> '',

$EML = new myMail();
$EML->assign('var','World'); // generic Smarty assign