0

Hello Community,
I was wondering if there is a way to send an email to a database?

Example:
So when the user sends an email to my websites email address the email will be broken up in to parts (Subject, From, Body etc...) and added to the database.

FYI: I'm using GoDaddy and a normal website hosting account that is using Linux.

4
Contributors
7
Replies
45
Views
4 Years
Discussion Span
Last Post by joshl_1995
1

You want to store this in an external DB? You want the data to be sent to your php server (and then to MySQL server) triggered by the email arriving in your inbox.

Or do you just need access to the mails (e.g. imap etc as mentioned)? Good post here:

http://harrybailey.com/2009/02/send-or-pipe-an-email-to-a-php-script/

FYI: I'm using GoDaddy and a normal website hosting account that is using Linux.

You may need to set up a subdomain (usu. via cPanel) - but I don't know if your bog standard GD hosting has that. You'll need to check these things.

Edited by diafol

Votes + Comments
very useful!
0

I don't know if this will help with what I want to acomplish.
I want a system so people can retrieve information from their profile by sending an email to my website email address then the website will gather what the user wants and emails it back to them.

Edited by joshl_1995

0

This should certainly be possible - as an extension of the method I outlined above. You simply tag on the 'email data out' code after the SQL query.

0

The only thing I'd say is that data within an email has to be formatted perfectly for it to work (i assume). SO email may not be the most effective method. An email form on your website should force certain formats. However, if you use a webform, this could be sent directly to the script without need for an email at all. The script of course could then send details of the update/request back to the user via email. No need for piping at all for that. The original request could be logged in a DB table and so could details of the 'returned email'.

Edited by diafol

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.