purpleonyx
asked on
PHP script to read e-mail attachment after POP3 login
So many questions asked about how to upload/attach a file to PHP's mailer process, sure no problem there.
Here's something on a different level I am trying to do.
1: PHP script that checks a specific e-mail account (via POP3)
2: After reading all of the data, I need PHP to read/import any file attachments based on an extension filter (ONLY import if they are *.gif, *.jpg, etc)
3: Save attachment to a folder (create if necessary) based on the sender's email address.
Most of this I have the answer for. A bit unclear on making a POP3 connection with PHP, but am sure I can figure that out... But how would I go about step 2, actually importing the body of the message, and grabbing any attachments? I need to accomodate both inline HTML images, and actual attachments.
Here's something on a different level I am trying to do.
1: PHP script that checks a specific e-mail account (via POP3)
2: After reading all of the data, I need PHP to read/import any file attachments based on an extension filter (ONLY import if they are *.gif, *.jpg, etc)
3: Save attachment to a folder (create if necessary) based on the sender's email address.
Most of this I have the answer for. A bit unclear on making a POP3 connection with PHP, but am sure I can figure that out... But how would I go about step 2, actually importing the body of the message, and grabbing any attachments? I need to accomodate both inline HTML images, and actual attachments.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome. Sounds like you've come up with a good solution
JP
JP
ASKER
As for the forward script, the problem is the mail server (Qmail) is on a separate machine, and it does not want to use dot-forward to send to another machine unless there is some sort of directory sharing, which I don't want. Feel free to correct me if my understanding of how this works is incorrect.
Much appreciated!