News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Handle Incoming Email with SendGrid
August 27, 2013 @ 10:30:34

On the SitePoint PHP blog today Lukas White has a new tutorial showing you how to handle incoming emails from SendGrid (well, pulled from SendGrid) and translate them into posts for your blog or site.

In this article, I'm going to look at how you might implement an email-to-post feature, using SendGrid. SendGrid is a service for sending email - usually in bulk, but they also offer a less well-publicized feature for handling incoming email. SendGrid can be configured to handle all incoming messages for a given domain by pinging a URI of your choosing, and by implementing a simple webhook, you can act on the incoming mail accordingly.

He bases the simple example off of the Slim framework, creating a structure with a basic database for users and posts. He then goes through the SendGrid interface, pointing out where you add the hostname and URL to call back when a new email comes in. He includes the code to create the callback functionality that accepts the POST request coming from SendGrid. This is then validated and inserted into the database to be pulled out later by the "posts" page. There's also a bit about saving images (or other files) that come in as attachments to the email.

0 comments voice your opinion now!
incoming email sendgrid callback post tutorial image attachment

Link: http://www.sitepoint.com/handle-incoming-email-with-sendgrid/

blog comments powered by Disqus

Similar Posts

IBM developerWorks: Craft a Webmail interface for PHP applications

Job Posting: Wasabi Systems Seeks Web Applications Engineer (Norfolk, VA)

NetTuts.com: When You're Hacked in WordPress: Staying Safe Later On

Job Posting: BINC (Recruiter) Seeks PHP Web Developer (East Bay, CA)

Vincent Composieux: Run a Symfony application using Docker and docker-compose (English)


Community Events

Don't see your event here?
Let us know!


opinion part2 api symfony2 example configure laravel series composer introduction voicesoftheelephpant podcast php7 conference application release performance framework community interview

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework