Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mailer = JFactory::getMailer();
- $config = JFactory::getConfig();
- $sender = array(
- $config->getValue( 'config.mailfrom' ),
- $config->getValue( 'config.fromname' ) );
- $mailer->setSender($sender);
- $recipient = "[email protected]";
- $mailer->addRecipient($recipient);
- $body = "Your body string\nin double quotes if you want to parse the \nnewlines etc";
- $mailer->setSubject('Your subject string');
- $mailer->setBody($body);
- $send = $mailer->Send();
- if ( $send !== true ) {
- echo 'Error sending email: ' . $send->message;
- } else {
- echo 'Mail sent';
- }
Advertisement
Add Comment
Please, Sign In to add comment