Advertisement
Guest User

php mailer usage

a guest
Apr 12th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  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();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement