PHP Classes

File: exemple

Recommend this page to a friend!
  Classes of Italo Lelis de Vietro   Easy Email   exemple   Download  
File: exemple
Role: Example script
Content type: text/plain
Description: A exemple of how to use the easy_email class
Class: Easy Email
Compose and send text and HTML e-mail messages
Author: By
Last change: Camel Case
Date: 11 years ago
Size: 1,026 bytes


Class file image Download

 * How to use the easy_class
 * @copyright Lellys inform├ítica
include_once 'easy_email.php';
//or you can use the last version of my class like this: include_once '';
//The email's subject
$subject = "Test Subject";

//The email's message
$msg = "<html>
        <h3>Test Message</h3>

//Inicialize a new easy_email object
$easy_email = new EasyEmail('', '');

 * You can customize you email like this:
 * $easy_email->setIsHTML = true; This will tell the email to include or not the HTML body on the header. The default is true.
 * $easy_email->setShowFrom = true; This will show the sender in the destination's mailbox. The default is true.

$easy_email->sendEmail($subject, $msg); //Send the email

//We verify if the email was succefull sent
if ($easy_email->getIsSent())