How to email data into a database, need help...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

How to email data into a database, need help...

Post by WithHisStripes »

Heya,
So I am working on a website that I'm going to write a simple CMS for, and I recall seeing blogging systems that allowed the user to submit a blog into the database by just emailing it to a particular address.
I assume PHP somehow parses the data and then wraps some MySQL INSERT statements around it or something, but I don't really know where to begin, does anyone have experience with this? Thanks!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: How to email data into a database, need help...

Post by califdon »

WithHisStripes wrote:Heya,
So I am working on a website that I'm going to write a simple CMS for, and I recall seeing blogging systems that allowed the user to submit a blog into the database by just emailing it to a particular address.
I assume PHP somehow parses the data and then wraps some MySQL INSERT statements around it or something, but I don't really know where to begin, does anyone have experience with this? Thanks!
The trouble is, email is a totally different system and protocol. No doubt there's a way to use some programming language (I would expect, not PHP) to make regular checks of the content of a POP3 or IMAP server and process it, but I think probably the reason for doing it that way would be to interject human decision making into the process. Is there some reason why you don't want to just use an online form? That is straightforward and there's copious amounts of info available on doing that.
WithHisStripes
Forum Contributor
Posts: 131
Joined: Tue Sep 13, 2005 7:48 pm

Re: How to email data into a database, need help...

Post by WithHisStripes »

You know I didn't consider that PHP wouldn't be able to do it, so thanks for bringing that to my attention.

No particular reason I wanted the client to be able to do it via email except to learn something new and see how it might improve a site.

I guess that was the answer I'm looking for, so thanks for your reply!
Post Reply