<?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 02:30:03 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Snipe.net: Sending Mail Using PHP and Amazon SES on Centos/AWS Linux]]></title>
      <guid>http://www.phpdeveloper.org/news/19371</guid>
      <link>http://www.phpdeveloper.org/news/19371</link>
      <description><![CDATA[<p>
In <a href="http://www.snipe.net/2013/03/sending-mail-using-php-and-amazon-ses-on-centosaws-linux/">this new post</a> to her site <i>Alison</i> shows how to send emails through the Amazon <a href="http://aws.amazon.com/ses/">Simple Email Service</a> (SES) from a CentOS instance (an <a href="https://aws.amazon.com/amis">AMI</a> in this case).
</p>
<blockquote>
If you find yourself using Amazon SES for sending outgoing emails in a PHP web app, getting everything set up is much simpler than it may seem. In my case, this was on an AWS Linux image, but it will work on any Fedora/CentOS AMI. You can, of course, set up sendmail and use a proper MTA to send email from your web app, but in this case, I had inherited the requirement to set up an environment for code that was already written to use SES for outgoing email and Google Apps for incoming emails, so the actual mechanics weren't up for debate.
</blockquote>
<p>
She includes screenshots showing how to configure the SES system with your site's domains and DNS as well as the email addresses you're planning on using. She links over to the <a href="http://sourceforge.net/projects/msmtp/">MSMTP</a> software you'll need to install on your instance to make the connection and what you'll need to do to get it configured for PHP's use. A sample email script is also included to test the connection (and where to look to make sure everything worked correctly).
</p>]]></description>
      <pubDate>Wed, 27 Mar 2013 10:56:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen: Sending an HTML with text alternative email with ZendMail]]></title>
      <guid>http://www.phpdeveloper.org/news/18689</guid>
      <link>http://www.phpdeveloper.org/news/18689</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a <a href="http://akrabat.com/zend-framework-2/sending-an-html-with-text-alternative-email-with-zendmail/">quick tutorial posted</a> to his site today showing you how to send an email with the ZendMail component of the Zend Framework 2 that contains HTML but provides a plain text backup in the same message.
</p>
<blockquote>
Sending a multi-part email with ZendMail is easy enough, but if you want to send an HTML email with a text alternative, you need to remember to set the content-type in the headers to multipart/alternative. As this is the second time I had to work this out, I'm noting it here for the next time I forget!
</blockquote>
<p>
The rest of the post is the code you'll need to send a simple email with a text and HTML body sections, configure the headers (to, from, etc) and the "multipart/alternative" header to make the HTML or plain text switching work correctly.
</p>]]></description>
      <pubDate>Fri, 02 Nov 2012 10:26:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sebastian G&ouml;ttschkes: symfony2: Testing email sending]]></title>
      <guid>http://www.phpdeveloper.org/news/18471</guid>
      <link>http://www.phpdeveloper.org/news/18471</link>
      <description><![CDATA[<p>
<i>Sebastian G&ouml;ttschkes</i> has a new post showing a method he's come up with to <a href="http://sgoettschkes.blogspot.nl/2012/09/symfony2-testing-email-sending.html">test email sending</a> in a Symfony2 application.
</p>
<blockquote>
On my endless struggle to achieving 100% code coverage and catching every possible (and impossible) test case (I'm just kiddinh, please don't do this!) I was in need for some way to test the sending of emails. This blog post will show you how to test this within a symfony2 (I'm using symfony 2.1 RC2) application, using the default swiftmailer.
</blockquote>
<p>
It's not unit testing, it's functional testing, and he provides a bit of background on the process first then sets up a dummy listener for testing and how to plug in the Symfony2 functionality (via a getContainer call to get the DIC).
</p>]]></description>
      <pubDate>Thu, 13 Sep 2012 08:52:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Implement Two-Way SMS with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18232</guid>
      <link>http://www.phpdeveloper.org/news/18232</link>
      <description><![CDATA[<p>
PHPMaster.com has an interesting new article posted today showing how you can use PHP to create a <a href="http://phpmaster.com/implement-two-way-sms-with-php/">two-way messaging (SMS) application</a> that can both send and initiate actions based on message content.
</p>
<blockquote>
SMS is used for various purposes these days. For example, major websites like Gmail and Facebook use SMS to improve their authentication process with multi-factor authentication and notifying users about the updates. These are one-way SMS applications since messages are sent only from these sites to the user. Two-way SMS applications are more complex than one-way ones. In two-way SMS apps, a user can initiate a conversation by sending messages, and then the application responds according to the user's commands.
</blockquote>
<p>
They base the application on the <a href="http://www.clickatell.com/">Clickatell</a> SMS service (not free, but cheap - pay by the message too) which includes the ability to hook into your API on a specific endpoint and relay the message data. The message can either be sent via a POST or GET and can easily be interpreted in your app extracting things like a timestamp, the number it came from and, of course, the actual text of the message. There's also a section about the "User Data Header" functionality that lets you easily split up a message for recombination on the remote device. Code is included for all examples.
</p>]]></description>
      <pubDate>Tue, 17 Jul 2012 08:46:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Paul Reinheimer's Blog: Sending Mail]]></title>
      <guid>http://www.phpdeveloper.org/news/17997</guid>
      <link>http://www.phpdeveloper.org/news/17997</link>
      <description><![CDATA[<p>
<i>Paul Reinheimer</i> has <a href="http://blog.preinheimer.com/index.php?/archives/383-Sending-Mail.html">posted about his experiences with sending mail</a>, specifically as it relates to using the <a href="http://framework.zend.com/manual/en/zend.mail.html">Zend_Mail</a> component from the Zend Framework to handle the details.
</p>
<blockquote>
Like every product, Natural Load Testing needs to send some mail, having written and re-written a bunch of different blocks of mail code over the years, I wanted to come up with something that would work now, and continue to serve us well into the future.
</blockquote>
<p>
He chose Zend_Mail to fulfill some of his requirements (multipart emails, sending custom emails, templates for automatic emails) and includes some sample code showing it at work. The result is an object that can be created and, by calling a "basic" method, can send an email based on an HTML template (using the <a href="http://htmlemailboilerplate.com/">HTML Email Boilerplate</a> for the base styling).
</p>]]></description>
      <pubDate>Wed, 23 May 2012 12:58:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Cats Who Code: Sending SMS with PHP and TextMagic: An A to Z guide]]></title>
      <guid>http://www.phpdeveloper.org/news/17736</guid>
      <link>http://www.phpdeveloper.org/news/17736</link>
      <description><![CDATA[<p>
On the Cats Who Code site today there's <a href="http://www.catswhocode.com/blog/sending-sms-with-php-and-textmagic-an-a-to-z-guide">a new tutorial</a> showing how to send SMS messages from your PHP application with the help of the <a href="http://is.gd/textmagic">TextMagic</a> service.
</p>
<blockquote>
Over the years, Short message service (SMS) has become a very important way of communication, and many businesses are looking for easy ways to send automated text messages to their customers. In this tutorial, I'm going to show you how you can send SMS using PHP and a third party service called <a href="http://is.gd/textmagic">TextMagic</a>. Its very easy to do!
</blockquote>
<p>
They step you through the process - creating a TextMagic account, configuring the account with your own password and creating a simple script that includes <a href="http://api.textmagic.com/https-api/sms-api-php-wrapper">their own API library</a> and sends the SMS request.
</p>]]></description>
      <pubDate>Tue, 27 Mar 2012 10:57:15 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Henrik Bj&oslash;rnskov's Blog: Stampie an in depth look]]></title>
      <guid>http://www.phpdeveloper.org/news/17266</guid>
      <link>http://www.phpdeveloper.org/news/17266</link>
      <description><![CDATA[<p>
<i>Henrik Bj&oslash;rnskov</i> has posted a bit of an <a href="http://henrik.bjrnskov.dk/stampie-in-depth/">in-depth look at Stampie</a>, an abstraction library for sending emails from PHP applications via various service providers (like <a href="http://sendgrid.com/">SendGrid</a> and <a href="http://mailchimp.com/">Mailchimp</a>).
</p>
<blockquote>
So what is Stampie. Stampie is a API wrapper for the most common email sending services. It provides a standard PHP Api to send emails. But mostly it is a project to test TDD and experiment with a couple of different things. Stampie is developed with Dependency Injection and therefore there is a lot of objects. At the start it can be quite cumbersome, but will make a lot of sense if you start to develop and add additional provider.
</blockquote>
<p>
He includes a bit of sample code showing the sending of a message via the SendGrid API backend. Extending the system is simpler thanks to DI and the customizable MailerInterface object type. There's also an AdapterInterface object that can be used to redefine the HTTP connection interface the tool uses. He also points to <a href="http://github.com/henrikbjorn/HBStampieBundle">the HBStampieBundle</a> bundle for the Symfony2 framework that can make dropping it into your current SF2 application simpler.
</p>
]]></description>
      <pubDate>Thu, 15 Dec 2011 12:48:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Sending Emails with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17031</guid>
      <link>http://www.phpdeveloper.org/news/17031</link>
      <description><![CDATA[<p>
In a new tutorial from PHPMaster.com <i>Jason Pasnikowski</i> takes a look at <a href="http://phpmaster.com/sending-emails-with-php/">sending emails with PHP</a> - an introduction to what the language offers and how it can be used to send an HTML version.
</p>
<blockquote>
In most cases your installation of PHP will be capable of sending emails. If you are using a shared host, or if you installed PHP using a package management system like apt-get, more than likely you're all set. You'll really only need to worry about extra configuration if you're compiling PHP from source or if you're running it on Windows. In either case, there are plenty of resources available online to help you out. Because that's all beyond the scope of this article, I'll assume you're set. If not, Google will be your friend.
</blockquote>
<p>
He starts with a simple example using the <a href="http://php.net/mail">mail</a> function but quickly moves on to sending a multi-part email with an attached zip file and HTML content. He includes the all code you'll need and explains each part in detail so you'll know exactly what's going on.
</p>]]></description>
      <pubDate>Mon, 24 Oct 2011 20:08:52 -0500</pubDate>
    </item>
    <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>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Howto Send/Read SMSs using a GSM modem, AT+ commands and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16077</guid>
      <link>http://www.phpdeveloper.org/news/16077</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog today showing how you can <a href="http://gonzalo123.wordpress.com/2011/03/21/howto-sendread-smss-using-a-gsm-modem-at-commands-and-php/">send and read SMS messages</a> with PHP through a GSM modem. The AT+ commands they use can be sent via a serial (or serial-to-usb) interface directly from your application to a local device. He includes both code and some sample AT commands to get the ball rolling.
</p>
<blockquote>
GSM modems are similar than normal modems. They've got a SIM card and we can do the same things we can do with a mobile phone, but using AT and AT+ commands programmatically. That's means we can send (and read) SMSs and create scripts to perform those operations. [...] The idea is the following one: We are going to create a main class called Sms. It takes in the constructor (via dependency injection) the HTTP wrapper or the serial one (both with the same interface). 
</blockquote>
<p>
His base SMS class provides open, close and read methods that talk with the device set in a child class (in this case "/dev/ttySO"). The sendSMS method is defined to take in the number to send to and the message. The AT command examples show how to send the SMS message, read all of the messages waiting and delete an SMS from the device. You can get the full code <a href="https://github.com/gonzalo123/gam-sms">from github</a>.
</p>]]></description>
      <pubDate>Tue, 22 Mar 2011 08:15:27 -0500</pubDate>
    </item>
  </channel>
</rss>
