<?php
 
# Version 1.0
 
require_once('../include/config.inc.php');
 
 
$email = new email();
 
 
# At minimum you only need a from,to,subject,body
 
 
// From e-mail
 
$email->setFrom('[email protected]','Senders Name');
 
 
// To e-mail
 
$email->addTo('[email protected]','Receivers Name');
 
 
// Add CC
 
$email->addCc('[email protected]','name');
 
 
// Add BCC
 
$email->addBcc('[email protected]','name');
 
 
// Add more headers
 
$email->addHeader('header name','header value');
 
 
// Set charset
 
$email->setCharset('');
 
 
// Set encoding
 
$email->setEncodingBit('');
 
 
// Generate Header for EML format
 
$email->exportEML();
 
 
// 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
 
$email->addAttachLocalFile('files/happy/me.jpg');
 
 
// attach a uploaded file
 
$email->addAttachPOSTFile($_FILES);
 
 
// Send email
 
$sent = $email->send();
 
 
?>
 
 
 |