Location: PHPKode > scripts > IDtpl3 > idtpl3/example3.php
<?php
//mail sending example
require_once('idtpl.class.php');
$template = new IDtpl('templates/');

$to= 'hide@address.com';
$subj= 'Qwe Zxc !!!';

//make headers
$template->define('priority', 3);
$template->define('from', 'ZXC');
$template->define('fmail', 'hide@address.com');
$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);
?>
Return current item: IDtpl3