warnockm Posted April 29, 2006 Share Posted April 29, 2006 I writing some php code to check my email and download the attachements. I'm using a pop account and using the imap() functions built into php. I am able to check my mail and see the encoded attachment in the body using imap_body(), however, i'm not sure what to do with it! DOes anyone know of example code or a plugin to deal w/ downloading attachements? the body looks like this:This is a multi-part message in MIME format. ------=_NextPart_000_0001_01C6687A.001D3210 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ------=_NextPart_000_0001_01C6687A.001D3210 Content-Type: image/jpeg; name="ATT00001.jpg" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ATT00001.jpg" /9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkz....I'd like to get the Content-Type, filename and content-transfer-encoding, as well as the contents out of the email. thanks Quote Link to comment Share on other sites More sharing options...
radox Posted April 30, 2006 Share Posted April 30, 2006 i think this link will help you get started.[a href=\"http://www.linuxscope.net/articles/mailAttachmentsPHP.html\" target=\"_blank\"]http://www.linuxscope.net/articles/mailAttachmentsPHP.html[/a]i needed to customize the encoding....good luck. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.