Jump to content

Reading received emails with attachment and insert into MySQL


hybmg57

Recommended Posts

if you're on a unix/linux box, it's simple to parse the emails and do whatever you want with them as they arrive. look into .forward files and how to pipe each email to a process. iirc, the .forward would look something like:

 

| php <your email parsing php file>

 

i've used this method before and it works quite well. google .forward files for the proper syntax. there's a lot you can do with them.

not being familiar with cpanel, i don't know. however, if there's not a way to direct received email from within cpanel, then contact your web hosting provider and ask them if something like this is supported and, if so, how to do it.

This is very possible with cPanel. I read email messages in a number of my sites.

 

You need a PHP script that will read the incoming email. Here's one tutorial. Another useful script is mime_parser.php which can get the attachment.

 

Then you need to set up a forward email in cPanel (see attachement)

 

Ken

 

 

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.