O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Email

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 JFactory method getMailer(). This object is configured with the global mail settings that administrators edit through the Global Configuration Server settings:

Email

In order to send an email we must retrieve the JMail object and set the sender's email address:

$mailer =& JFactory::getMailer();
$mailer->setSender('example@example.org');

There are two ways in which we can specify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required