Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # Invoke JMail Class
  2. $mailer = JFactory::getMailer();
  3.  
  4. # Set sender array so that my name will show up neatly in your inbox
  5.  
  6. $mailer->setSender($data[β€˜mailfrom’]);
  7.  
  8. # Add a recipient β€” this can be a single address (string) or an array of addresses
  9.  
  10. $mailer->addRecipient($user->email);
  11.  
  12. $mailer->setSubject(utf8_decode($subject));
  13.  
  14. $mailer->setBody($body);
  15.  
  16. # If you would like to send as HTML, include this line; otherwise, leave it out
  17.  
  18. $mailer->isHTML();
  19.  
  20. # Send once you have set all of your options
  21.  
  22. $return = $mailer->send();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement