PHP Classes

File: email_test.php

Recommend this page to a friend!
  Classes of bobak   pg_email   email_test.php   Download  
File: email_test.php
Role: Example script
Content type: text/plain
Description: Example
Class: pg_email
Compose and send e-mail messages using template
Author: By
Last change:
Date: 15 years ago
Size: 1,021 bytes
 

Contents

Class file image Download
<?php
/*
 _____ ______ _ _ ______
| __ \ | ___ \ | | || ___ \
| | \/_ __ ___ ___ _ __ | |_/ / |_| || |_/ /
| | __| '__/ _ \/ _ \ '_ \| __/| _ || __/
| |_\ \ | | __/ __/ | | | | | | | || |
 \____/_| \___|\___|_| |_\_| \_| |_/\_|
----------------------------------------------
(C)BOBAK 2008 V4.0
----------------------------------------------
web : http://www.greenphp.com
email : bobak@greenphp.com
----------------------------------------------
*/

/**
 * Test management of sending e-mail-based on file models.
 *
 * @author Bobak
 * @package mail
 * @subpackage test
 */

require_once('email.php');

// New object
$EMail=new email('test.mail');

//Add a var (upcase)
$EMail->AddVar('VAR1','VAR_TEST1');

//Add a var (lowcase)
$EMail->AddVar('var2','VAR_TEST2');

//Add a attachment file
$EMail->ImportFile('test2.mail');

//Run as local mode = with log
if ($EMail->Post())
  {echo
"OK";}
  else
  {echo
"Err : ".$EMail->FlagErrMsg;}

?>