<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 19 May 2013 16:52:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[RooJs.com: How to spam in PHP..]]></title>
      <guid>http://www.phpdeveloper.org/news/16173</guid>
      <link>http://www.phpdeveloper.org/news/16173</link>
      <description><![CDATA[<p>
On RooJs.com there's a recent post from <i>Alan Knowles</i> looking at <a href="http://roojs.com/index.php/View/233/How_to_spam_in_PHP.html">how to spam in PHP</a>. No, nothing malicious - it's more about scalability in sending emails from PHP applications.
</p>
<blockquote>
The reason this has been relivant in the last two weeks is two fold, first off, my slow and sometimes painfull <a href="http://roojs.com/mtrack/>rewrite of mtrack</a> has got to the point of looking at email distribution. Along with this I have  a project that needs to distribute press releases, and track responses. Since both projects now use the same underlying component framework (<a href="http://www.roojs.com/mtrack/index.php/Browse/default/Pman.Core">Pman.Core</a> and <a href="http://www.roojs.com/mtrack/index.php/Browse/default/Pman.Base">Pman.Base</a>). It seemed like an ideal time to write some generic code that can solve both issues.
</blockquote>
<p>
He mentions the usual method of generating numerous emails and sending them to a remote SMTP server, but points out that there's  a better way. You can take advantage of queuing and batch sending techniques and, the way he decided to do it for mtrack, using queue tables and a backend runner (a cron job) that uses <a href="http://php.net/proc_open">proc_open</a> to send out multiple emails at once. You can <a href="http://www.roojs.com/mtrack/index.php/File/default/Pman.Core/NotifySend.php?jump=">see the code for it here</a>.
</p>]]></description>
      <pubDate>Mon, 11 Apr 2011 10:20:41 -0500</pubDate>
    </item>
  </channel>
</rss>
