Can anyone tell me, Is there a class file to read and save the attachments from an email using pop3 account details. For now i've the code to read the email and print the email contents but i cant able to save it.
Please help me in this.
Email parsing with PHP
Moderator: General Moderators
Re: Email parsing with PHP
I'm sure there is. Have you asked Google yet?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Email parsing with PHP
You can use the imap() function family over a pop3 connection. Specifically the function you want is imap_fetchstructure(), however it is not exactly straight forward to extract the email parts.
This comment (and others on the page as well) has a helpful snippet that you may find useful
This comment (and others on the page as well) has a helpful snippet that you may find useful