Login   Register  
PHP Classes
elePHPant
Icontem

File: sample4.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Grigori Kochanov  >  Smarty and MIME message integration  >  sample4.php  >  Download  
File: sample4.php
Role: Example script
Content type: text/plain
Description: sample 4
Class: Smarty and MIME message integration
Send e-mail messages using Smarty templates
Author: By
Last change:
Date: 7 years ago
Size: 625 bytes
 

Contents

Class file image Download
<?php
require_once "my_smarty.class.php";
require_once 
"mymail.class.php";
require_once 
"email_message.php";

/**
 *  You can define the type of the letter implicitly and write the full template file name
 */


$options = array(
    
'template'=>'sample4.tpl'//full template name
    
'send_html'=>false//send as a plain text (default - as HTML)
    
'to_address'=>'gri@devel.grik.net',
    
'to_name'=>'Grigori Kochanov',
    
'from_name'=> 'Joe Black',
    
'from_address'=> 'joe.black@example.com',
   );

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