Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Douglas M Santos  >  GafMail  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: GafMail
Compose and send text or HTML e-mail messages
Author: By
Last change:
Date: 2007-03-12 11:13
Size: 537 bytes
 

Contents

Class file image Download
<html>
<body>
<?
        
require_once "GafMail.inc.php";
        
$m GafMailFactory::createMail();
        
$m->setSubject("Enter Subject Here");
        
$m->setFrom("from@test.com.br");
        
$m->setTo("recipient@test.com.br");
        
$m->setReplyTo("replyto@test.com.br"); // optional
        
$m->isHtml=true//default false        
        
$m->setBody("<h3>Este</h3> é um <a href=#>e-mail</a> qualquer"); // text or html message body
        
$m->send();
        if(
$m->hasErrors()){
            echo 
"error send mail";            
        }
        else{
            echo 
"mail sent";
        }
        

?>
</body>
</html>