Jump to content

Email message and attachments to mysql?


adrian28uk

Recommended Posts

Is there a way to send an email to a specific address from an email client that would automatically insert the message in plain text to mysql. Could this also be done with attachments as well. I have seen a couple of support tickets systems work like this.

I was wondering if you have any ideas on this?

Thank you

Link to comment
Share on other sites

two ways:

1. if your smtp server or MTA has a sendtoprogram mode then you could direct the output of the mail handler to a php script.  postfix has such a thing.
2. use php's imap functions to poll your email account from time to time and parse the new email in there.  there are some nice classes in PEAR which will do this for you if your coding skills are not currently up to it.  if you want an example of an application that does this have a look at wordpress's code.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.