Lewis
Lewis

Reputation: 147

Using email to update SQL database

Is it possible to use email to update mysql table?

for example I have someone send email which have today article with the image as an attachment and it have to send to particular email address (eg: [email protected]) to be able to process data to sql table, other address will not work for updating.

Once it receive, it automatically proceed and update sql from the article it receive.

How is it work? is there any open source that may help this process

Upvotes: 1

Views: 3638

Answers (3)

Femi
Femi

Reputation: 64700

Take a look at Sendgrid (at http://sendgrid.com): they have a parse API (see http://wiki.sendgrid.com/doku.php?id=parse_api for details) that basically lets you convert an email into an HTTP POST. So if you already have a web page that can update the MySQL database you can just modify it to comply with their spec, set up a sub domain that forwards to Sendgrid and then setup a Sendgrid endpoint that takes any email to that sub domain and posts it to your web page.

Upvotes: 1

AJ.
AJ.

Reputation: 28174

It depends on your application. If you're using a framework like Wordpress, there are plenty of plugins available to integrate (e.g. Postie). If you have your own custom application, you may find an open source script to download the new messages, but you'll have to implement your own code to update your database.

Upvotes: 0

Eric Herlitz
Eric Herlitz

Reputation: 26267

Not by sql, you have to involve some sort of programming language which have a subset of methods to communicate with the database and that can receive and send email.

Upvotes: 3

Related Questions