sid_o Posted September 24, 2007 Share Posted September 24, 2007 Hi all, i am trying to decode a raw email, i succedded to get the headers such as the from & to & subjects field but i seem to have a problem extracting the attachment. does anybody has a clue how to check if there is an attachment & how to save it in a directory? thanks for the help. Sagee Quote Link to comment https://forums.phpfreaks.com/topic/70484-mime-parser/ Share on other sites More sharing options...
SharkBait Posted September 24, 2007 Share Posted September 24, 2007 The attachment header would be included at the beginning of the email: Content-Type: multipart/mixed; boundary="==--somewhereboundaryhere==" And then the email attachment might look something like: Content-Type: x-application/zip; name="MyFile" Content-Transfer-Encoding: base64 Then its just data encoded which will have the boundary on a separate line. As for how to actually parse it.. that's something I haven't done, I've only created emails with attachments, not the other way around. Quote Link to comment https://forums.phpfreaks.com/topic/70484-mime-parser/#findComment-354301 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.