|
|
 Carl Wuensche - 2008-08-23 23:43:31 - In reply to message 10 from Manuel Lemos
Will the MIME parser correctly parse an email sent from a cell phone with an image in it?
I'm not sure if it's inline though... I don't think it is.
 Manuel Lemos - 2008-08-24 00:06:58 - In reply to message 11 from Carl Wuensche
Sure, as long as the message is MIME standards compliant, which it should be, there is no problem.
 magdikova - 2008-11-28 16:00:58 - In reply to message 11 from Carl Wuensche
How to download only *.csv attachments
 Manuel Lemos - 2008-11-28 20:48:33 - In reply to message 13 from magdikova
You can use the SaveBody option and then check the file names or content types of the message parts to see which are in CSV format.
 Peter Kothaj - 2009-08-19 08:59:00 - In reply to message 1 from Carl Wuensche
I want to simply read the inbox by php IMAP functions and save all found attachments in a specified directory.
I didn't figure out, how to use this class to do so. Its too advanced so i am not able to customize it myself.
ReadAtachment class is simple to undestand and reads attachments, however all attachments saved by that class are corrupted. I want to decode messages correctly.
Could you help me in this ?
 Manuel Lemos - 2009-08-19 09:12:59 - In reply to message 15 from Peter Kothaj
This class needs the whole message headers and body. It can only be used with the PHP IMAP functions if you can retrieve the whole message into a string and pass it to the MIME parser class.
Alternatively, if you can access your messages using POP3, you can use this POP3 class in conjunction with the MIME parser class.
phpclasses.org/pop3class
 Peter Kothaj - 2009-08-19 10:50:49 - In reply to message 16 from Manuel Lemos
Hello,
thank you for fast reply. I have trouble to 'retrieve the whole message into a string'. I tryed to use imap_body, but that obviously does not work, as it doesnt contain headers. I didn't find any imap function to get whole message into a string including headers or to get headers in a string form. imap_headerinfo() only make object, which does not help.
Do you have any idea how to resolve this ?
 Peter Kothaj - 2009-08-19 11:21:54 - In reply to message 16 from Manuel Lemos
I already resolved the problem.
I got correct whole message by this:
$email_headers=imap_fetchheader($stream,$number);
$email_body=imap_body($stream,$number);
$email_complete=$email_headers.$email_body;
Now all messages got saved succefully and are not corrupt. It works like charm :) I will just need to somehow change way, how files are saved (1,2,3,4... without extensions).
Thank you for making such a great class.
 Manuel Lemos - 2009-08-19 18:42:05 - In reply to message 18 from Peter Kothaj
Those number file names are just safe automatic names. The class does not use the original file names in the messages because it may be dangerous. An attacker may send you messages with file names that overwrite existing files in your system.
Still, the original file names, when present they are returned in the message structure array.
|