<?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>Wed, 19 Jun 2013 12:01:16 -0500</pubDate>
    <ttl>30</ttl>
    <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[Arvind Bhardwaj's Blog: How to Test PHP Emails on Localhost]]></title>
      <guid>http://www.phpdeveloper.org/news/18072</guid>
      <link>http://www.phpdeveloper.org/news/18072</link>
      <description><![CDATA[<p>
In <a href="http://www.webspeaks.in/2012/05/how-to-test-php-emails-on-localhost.html">this quick tutorial</a> <i>Arvind Bhardwaj</i> shows a method for testing your scripts that need to send emails, but on your localhost system.
</p>
<blockquote>
While developing web applications on localhost you must have always missed the functionality to send mails. As localhost does not support email service, so it has always been a bottleneck for email testing on localhost. But I have found a simple way to test emails on localhost using PHP. I have overridden the default mail() function of PHP to create a text/html file based on the email format. If the email is in html format, an HTML file is created otherwise a text file is created. You can see in this file what exactly is the content sent in your mail. See how does it work.
</blockquote>
<p>
He shows how to override the mail function with your own custom "mail" function, just in a difference namespace. He includes the sample code to send the email (the "mail" function), a basic HTML template you can use and and example of it in use.
</p>]]></description>
      <pubDate>Sat, 09 Jun 2012 12:02:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DreamInCode.com: Preventing PHP Mail(...) Header Injections]]></title>
      <guid>http://www.phpdeveloper.org/news/16237</guid>
      <link>http://www.phpdeveloper.org/news/16237</link>
      <description><![CDATA[<p>
On the Dream In Code forums there's a recent post showing you how to <a href="http://www.dreamincode.net/forums/topic/228389-preventing-php-mail-header-injections/">prevent mail() header injections</a> when taking user input, like from a form.
</p>
<blockquote>
PHP's mail() function is a very useful and powerful function, even to the point that it is very easy to exploit. A way hackers exploit this function is a method called email header injection. [...] I'm sure most of you can already tell that's not going to be pretty since we didn't check the user input and so forth. PHP provides us with functions such as <a href="http://www.php.net/manual/en/function.filter-var.php">filter_var</a> which will validate user input and either return false if the validation fails or return the filtered data.
</blockquote>
<p>
He includes an example of using this filtering methods to check the user input for malicious information - validating that the "to" address is a valid email (FILTER_VALIDATE_EMAIL) and a sanitize() method that removes things like newlines, carriage returns and a few other characters.
</p>]]></description>
      <pubDate>Fri, 22 Apr 2011 11:06:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Send Text Messages with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15801</guid>
      <link>http://www.phpdeveloper.org/news/15801</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a new tutorial showing you how to <a href="http://net.tutsplus.com/tutorials/php/how-to-send-text-messages-with-php/">send text messages</a> via SMS directly from your script to the user's cell phone.
</p>
<blockquote>
Text messaging has become extremely widespread throughout the world - to the point where an increasing number of web applications have integrated SMS to notify users of events, sales or coupons directly through their mobile devices. In this tutorial, we will cover the fundamentals of sending text messages with PHP.
</blockquote>
<p>
Their method "cheats" a little bit and uses an interface many of the cell phone providers offer to their subscribers - a link from an email address to SMS. Most providers <a href="http://www.venture-ware.com/kevin/?p=83">have their domains</a> you can send the email to and have it automatically forwarded to the user's cell as a text. Thankfully, this requires nothing more than the <a href="http://php.net/mail">mail</a> function to accomplish. They include the sample code and HTML+CSS to make a basic form as well as mention <a href="http://phpmailer.worxware.com/">PHPMailer</a> as a more powerful mailing alternative.
</p>]]></description>
      <pubDate>Tue, 25 Jan 2011 10:14:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Downloading and Parsing Gmail Messages in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15057</guid>
      <link>http://www.phpdeveloper.org/news/15057</link>
      <description><![CDATA[<p>
New on PHPBuilder.com today there's a tutorial showing you how to <a href="http://www.phpbuilder.com/columns/PHP-IMAP-Gmail/Rose_Kelleher083110.php3">download and parse</a> messages from Google Mail. In their case it's grabbing and parsing submissions from a form.
</p>
<blockquote>
Some friends of mine publish a literary journal that accepts submissions via email. At their request I wrote a script to download messages from the journal's Gmail account and do some simple parsing tasks. Most of the submissions are made using an HTML form and a corresponding mailer script on their website, so I knew the precise format of the incoming messages (see Figure 1). What I didn't know was how to access Gmail in PHP.
</blockquote>
<p>
He tried out the <a href="http://gmail-lite.sourceforge.net/wordpress/index.php/about/libgmailer/">libgmailer</a> script first, but ran into roadblocks until he realized he could use something PHP already had - the <a href="http://php.net/imap">imap functions</a>. With these he shows how to make a connection to the Gmail servers, get the listing of messages and pull out the body for the one you want to parse.
</p>]]></description>
      <pubDate>Wed, 01 Sep 2010 09:21:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Setting Up Mail() on Windows, or: Where is my Windows Sendmail.exe?]]></title>
      <guid>http://www.phpdeveloper.org/news/13089</guid>
      <link>http://www.phpdeveloper.org/news/13089</link>
      <description><![CDATA[<p>
In his development on a Windows environment, <i>Daniel Cousineau</i> has come across a hurdle - sending emails from his local machine from his PHP scripts. Thankfully he's found a solution and has <a href="http://www.toosweettobesour.com/2009/08/21/development-environment-help-setting-up-php-mail-on-windows-or-where-is-my-windows-sendmail-exe/">shared it in a new blog post</a>.
</p>
<blockquote>
Previously it was a simple trek to a website to download a Windows build of sendmail.exe, but for some reason I cannot get access to it, so I have to go another route. Enter <a href="http://www.hmailserver.com/">hMailServer</a>, a free, full-featured SMTP/POP/IMAP server for Windows with a pretty, shiny GUI configuration interface. All I really want to do is setup SMTP for localhost only but one could easily use hMailServer as a production mail server.
</blockquote>
<p>
He includes the details (along with some screenshots) to get the hMainServer software up and running. Thanks to the simple GUI the tool offers you can be up and working in a few clicks - oh, and a change to your php.ini file.
</p>]]></description>
      <pubDate>Fri, 21 Aug 2009 13:14:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org Blog: Sending e-mail using [Remote] SMTP servers/MIME Email]]></title>
      <guid>http://www.phpdeveloper.org/news/12373</guid>
      <link>http://www.phpdeveloper.org/news/12373</link>
      <description><![CDATA[<p>
On the PHPClasses.org blog <i>Manuel Lemos</i> has <a href="http://www.phpclasses.org/blog/package/9/post/1-Sending-email-using-SMTP-servers-of-Gmail-Hotmail-or-Yahoo-with-PHP.html">a recent post</a> looking at a method for sending emails using a remote SMTP server (like Google or Yahoo's) via <a href="http://www.phpclasses.org/blog/package/14/post/1-Sending-messages-to-many-recipients-via-SMTP-in-PHP.html">this package</a>.
</p>
<blockquote>
In most hosting environments, the PHP mail() function is sufficient to send e-mail messages without problems. However, there are situations on which using the mail function is inconvenient and may prevent that your messages reach the destination. [...] Therefore, you may need to find an alternative way for sending your e-mail messages from PHP.
</blockquote>
<p>
The <a href="http://www.phpclasses.org/blog/package/14/post/1-Sending-messages-to-many-recipients-via-SMTP-in-PHP.html">package</a> lets you define a username/password, server, whether to use a SSL connection or not, and if the connection needs to use the TLS protocol.
</p>]]></description>
      <pubDate>Mon, 20 Apr 2009 11:15:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 9 Extremely Useful and Free PHP Libraries]]></title>
      <guid>http://www.phpdeveloper.org/news/12309</guid>
      <link>http://www.phpdeveloper.org/news/12309</link>
      <description><![CDATA[<p>
NETTUTS.com has posted <a href="http://net.tutsplus.com/articles/web-roundups/9-extremely-useful-and-free-php-libraries/">a list of nine libraries</a> you can use to quickly and easily add functionality to your web application.
</p>
<blockquote>
A lot of functionality is shared among applications - like sending emails or preventing spam. In the spirit of reusing the wheel instead of reinventing it, here are nine free web libraries that you can use in your next program which will dramatically increase your efficiency. 
</blockquote>
<p>Here's their list:</p>
<ul>
<li><a href="http://recaptcha.net/plugins/php/">ReCAPTCHA</a>
<li><a href="http://akismet.com/">Akismet</a>
<li><a href="http://pear.php.net/package/Services_JSON">Services_JSON</a>
<li><a href="http://smarty.net/">Smarty</a>
<li><a href="http://pchart.sourceforge.net/download.php">pChart</a>
<li><a href="http://simplepie.org/">SimplePie</a>
<li><a href="http://phpxmlrpc.sourceforge.net/#download">XML-RPC PHP Library</a>
<li><a href="http://undesigned.org.za/2007/10/22/amazon-s3-php-class">Amazon S3</a>
<li><a href="http://phpmailer.codeworxtech.com/index.php?pg=sf&p=dl">PHPMailer</a>
</ul>
<p>
Screenshots (and code examples) are provided for several of the items as well as links to their website and documentation pages.
</p>]]></description>
      <pubDate>Thu, 09 Apr 2009 07:51:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: Mail Logging for PHP 5.3+]]></title>
      <guid>http://www.phpdeveloper.org/news/11722</guid>
      <link>http://www.phpdeveloper.org/news/11722</link>
      <description><![CDATA[<p>
<i>Ilia Alshanetsky</i> has <a href="http://ilia.ws/archives/190-Mail-Logging-for-PHP-5.3+.html">officially submitted</a> his logging patch for the <a href="http://php.net/mail">mail</a> function in PHP:
</p>
<blockquote>
I've finally got of my ass and committed my mail logging patch I've written almost 2 years ago. This functionality is predominantly aimed at shared hosters that often have a problem identifying people who abuse the mail() function to send an in-ordinate amount of spam or hacked scripts used for the some purpose. The logging functionality is disabled by default but can be enabled on a per-directory or globally via 2 INI settings.
</blockquote>
<p>
A new directive in your php.ini file (mail.log) lets you specify where the mail log needs to go. You can also use the mail.add_x_header setting to add in a mail header with the name of the script that sent it (and the UID). 
</p>
<p>
It will be included in PHP 5.3 but if you're running PHP 5.2 and want to get a jump on it, <a href="http://news.php.net/php.cvs/55496">here's the patch</a>.
</p>]]></description>
      <pubDate>Mon, 12 Jan 2009 12:53:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer.com: Sending Email with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11346</guid>
      <link>http://www.phpdeveloper.org/news/11346</link>
      <description><![CDATA[<p>
On the Developer.com website today, <i>Jason Gilmore</i> has <a href="http://www.developer.com/open/article.php/3782831">a new tutorial</a> covering a important feature of any based PHP install (unless disabled, of course) that is widely taken advantage of - sending emails.
</p>
<blockquote>
Email plays a crucial role in website development, whether you'd like to confirm a new registrant's email address, recover a lost password, or provide prospective clients with a convenient means to contact you. [...] In this tutorial, I'll introduce you to several solutions for sending email using PHP, including PHP's native mail() function, PEAR's Mail package, and the Zend Framework.
</blockquote>
<p>
He starts with some of the fundamentals of mail - the difference between POP3 and SMTP, Sendmail, etc - before moving on to an example of the <a href="http://www.php.net/mail">mail</a> function's usage. He does the same with the PEAR Mail package and the <a href="http://framework.zend.com/manual/en/zend.mail.html">Zend_Mail</a> component of the Zend Framework.
</p>]]></description>
      <pubDate>Wed, 05 Nov 2008 07:58:47 -0600</pubDate>
    </item>
  </channel>
</rss>
