PHP Classes

File: htmlexample.php

Recommend this page to a friend!
  Classes of JJ Harrison   Mailer Class   htmlexample.php   Download  
File: htmlexample.php
Role: Example script
Content type: text/plain
Description: Example Sending HTML Email
Class: Mailer Class
Compose and sent text and HTML e-mail messages
Author: By
Last change:
Date: 19 years ago
Size: 363 bytes
 

Contents

Class file image Download
<?

$mail
= new mailer;
$mail->from('SITE_WEBMASTER_EMAIL', 'AASMIC Webmaster');
$mail->add_recipient($email);//add a recipient in the to: field
$mail->html();
$mail->subject('Email confirmation for '.$email);//set subject
$message = '<h1>This is a test!</h1>'; $mail->message($message);//set message body
             
$mail->send();//send email(s)