Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Gerry Danen  >  Danen Email  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Sample usage
Class: Danen Email
Compose and send text and HTML e-mail messages
Author: By
Last change:
Date: 3 years ago
Size: 850 bytes
 

Contents

Class file image Download
<?php

require_once 'email.class.php';
$mail = New Email();

//    recipients
$mail->address('to', array('Gerry Danen','gerry@danen.com'));
$mail->address('to', array(
    array(
'Barry Danen1','barry.danen@thermam.com'),
    array(
'G Danen2','gerry.danen@therman.com'),
    array(
'Adri Danen','a.danen@therman.com'),
    ));
$mail->address('to', array('Test Danen','test@gmail.com'));

$mail->address('bcc', array('Danen, G','gdanen@therman.com'));

$mail->subject("A Real Big Problem");
$mail->message("<p>Message line 1\nLine 2\nLine 3\nThis is an <span style='color: #CC1F1F;'><strong>html</strong></span> message.</p>");

$mail->style('fontsize''2em');

echo 
$mail->send(      ) ? 'Message was sent.<br>' 'ERROR: Message was NOT sent!<br>';
echo 
$mail->send('text') ? 'Message was sent.<br>' 'ERROR: Message was NOT sent!<br>';
?>