<?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('someone@somedomain.com','Senders Name');
// To e-mail
$email->addTo('someone@somedomain.com','Receivers Name');
// Add CC
$email->addCc('someone@somedomain.com','name');
// Add BCC
$email->addBcc('someone@somedomain.com','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();
?>
|