PHP Classes

File: sample1.php

Recommend this page to a friend!
  Classes of Grigori Kochanov  >  Smarty and MIME message integration  >  sample1.php  >  Download  
File: sample1.php
Role: Example script
Content type: text/plain
Description: sample 1 - send basic email
Class: Smarty and MIME message integration
Send e-mail messages using Smarty templates
Author: By
Last change:
Date: 9 years ago
Size: 660 bytes


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

 * To send a plain text letter you should create a template for the letter with the ".txt.tpl" extension
 * in the Smarty template folder

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

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