PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Gerry Danen   Danen Email   ???   Download  
File: ???
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: 14 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','[email protected]'));
$mail->address('to', array(
    array(
'Barry Danen1','[email protected]'),
    array(
'G Danen2','[email protected]'),
    array(
'Adri Danen','[email protected]'),
    ));
$mail->address('to', array('Test Danen','[email protected]'));

$mail->address('bcc', array('Danen, G','[email protected]'));

$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>';
?>