Email has revolutionized communication.
Joomla! provides us with the
JMail class, which allows us to send email.
JMail supports three different mechanisms for sending email: the PHP mail function, Sendmail, and SMTP.
There is a global
JMail object that we can access using the
getMailer(). This object is configured with the global mail settings that administrators edit through the Global Configuration Server settings:
In order to send an email we must retrieve the
JMail object and set the sender's email address:
$mailer =& JFactory::getMailer(); $mailer->setSender('email@example.com');
There are two ways in which we can specify ...