PHP Classes

File: ex_email.php

Recommend this page to a friend!
  Classes of Danny Tucker   EZ Framework   ex_email.php   Download  
File: ex_email.php
Role: Example script
Content type: text/plain
Description: Example
Class: EZ Framework
Framework providing several types of functionality
Author: By
Last change:
Date: 17 years ago
Size: 1,012 bytes


Class file image Download
# Version 1.0

$email = new email();

# At minimum you only need a from,to,subject,body

// From e-mail
$email->setFrom('','Senders Name');

// To e-mail
$email->addTo('','Receivers Name');

// Add CC

// Add BCC

// Add more headers
$email->addHeader('header name','header value');

// Set charset

// Set encoding

// Generate Header for EML format

// subject
$email->setSubject('Did this email work?');

// body + html
$email->setBodyHTML('This is my <b>bold</b> tag.');

// body no html
$email->setBodyText('no html');

// attach a file

// attach a uploaded file

// Send email
$sent = $email->send();