Guest User

Untitled

a guest
Aug 17th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $mailer = JFactory::getMailer();
  2. $config = JFactory::getConfig();
  3. $sender = array(
  4. $config->getValue( 'config.mailfrom' ),
  5. $config->getValue( 'config.fromname' ) );
  6. $mailer->setSender($sender);
  7. $recipient = "[email protected]";
  8.  
  9. $mailer->addRecipient($recipient);
  10.  
  11. $body = "Your body string\nin double quotes if you want to parse the \nnewlines etc";
  12. $mailer->setSubject('Your subject string');
  13. $mailer->setBody($body);
  14. $send = $mailer->Send();
  15. if ( $send !== true ) {
  16. echo 'Error sending email: ' . $send->message;
  17. } else {
  18. echo 'Mail sent';
  19. }
Advertisement
Add Comment
Please, Sign In to add comment