Login   Register  
PHP Classes
elePHPant
Icontem

File: example3.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Valentin  >  IDtpl  >  example3.php  >  Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: example script (3) shows how you can send e-mail with templates
Class: IDtpl
Template engine based on PHP template scripts
Author: By
Last change: fix
Date: 2009-03-17 09:41
Size: 610 bytes
 

Contents

Class file image Download
<?php
//mail sending example
require_once('idtpl.class.php');
$template = new IDtpl('templates/');

$to'qwe@qwe.qwe';
$subj'Qwe Zxc !!!';

//make headers
$template->define('priority'3);
$template->define('from''ZXC');
$template->define('fmail''zxc@zxc.zxc');
$template->template('mail_headers.tpl');
$headers$template->gethtml();

//make message
$template->define('mailtext''many many many text!!!');
$template->template('mail_template.tpl');
$message$template->gethtml();

//and so, as we prepared all we need we can now send message
mail($to,$subj,$message,$headers);
?>