<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docs.joomla.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docs.joomla.org/index.php?title=JFactory/getMailer&amp;feed=atom&amp;action=history</id>
		<title>JFactory/getMailer - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://docs.joomla.org/index.php?title=JFactory/getMailer&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://docs.joomla.org/index.php?title=JFactory/getMailer&amp;action=history"/>
		<updated>2013-05-20T07:40:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.3</generator>

	<entry>
		<id>http://docs.joomla.org/index.php?title=JFactory/getMailer&amp;diff=11986&amp;oldid=prev</id>
		<title>Chris Davenport: New page: Returns a reference to the global mail object, only creating it if it doesn't already exist.  The object returned will be of type JMail. ===Syntax=== object JMail getMailer()  ===E...</title>
		<link rel="alternate" type="text/html" href="http://docs.joomla.org/index.php?title=JFactory/getMailer&amp;diff=11986&amp;oldid=prev"/>
				<updated>2008-11-23T19:51:55Z</updated>
		
		<summary type="html">&lt;p&gt;New page: Returns a reference to the global mail object, only creating it if it doesn&amp;#039;t already exist.  The object returned will be of type &lt;a href=&quot;/JMail&quot; title=&quot;JMail&quot;&gt;JMail&lt;/a&gt;. ===Syntax=== object &lt;a href=&quot;/JMail&quot; title=&quot;JMail&quot;&gt;JMail&lt;/a&gt; getMailer()  ===E...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Returns a reference to the global mail object, only creating it if it doesn't already exist.  The object returned will be of type [[JMail]].&lt;br /&gt;
===Syntax===&lt;br /&gt;
object [[JMail]] getMailer()&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
In this example, a test email is sent to the email address of the site owner.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$mail =&amp;amp; JFactory::getMailer();&lt;br /&gt;
&lt;br /&gt;
$config =&amp;amp; JFactory::getConfig();&lt;br /&gt;
$mail-&amp;gt;addRecipient( $config-&amp;gt;getValue( 'config.mailfrom' ) );&lt;br /&gt;
$mail-&amp;gt;setSubject( 'Test message' );&lt;br /&gt;
$mail-&amp;gt;setBody( 'This is an example email to test the Joomla! JFactory::getMailer() method.  Please ignore it' );&lt;br /&gt;
&lt;br /&gt;
if ($mail-&amp;gt;Send()) {&lt;br /&gt;
  echo &amp;quot;Mail sent successfully.&amp;quot;;&lt;br /&gt;
} else {&lt;br /&gt;
  echo &amp;quot;An error occurred.  Mail was not sent.&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===See also===&lt;br /&gt;
* [http://api.joomla.org/Joomla-Framework/JFactory.html#getMailer JFactory-&amp;gt;getMailer on api.joomla.org]&lt;br /&gt;
* [[JMail]]&lt;br /&gt;
&amp;lt;noinclude&amp;gt;[[Category:Development]][[Category:Framework]][[Category:JFactory]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Chris Davenport</name></author>	</entry>

	</feed>