SHARE
TWEET

php mailer usage

a guest Apr 12th, 2012 4 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $email = new EmailHandler('info@mydomain.tld');
  2.  
  3. $email->addRecipient('foo@bar.tld');
  4. $email->setSubject('Test Email for Email manager');
  5.  
  6. $email->setText('This is a test email.');
  7. $email->setHTML('<b>This is a test email</b>');
  8.  
  9. $email->addAttachment('somefile.txt', 'newfilename.txt');
  10. $email->addAttachment('123456789.jpg', 'photo.jpg');
  11.  
  12. //Send the email off
  13. $email->send();
  14.  
  15. //OR
  16.  
  17. //queue the email for sending by the cron daemon
  18. $email->queue();
RAW Paste Data
Top