The doc says: <pre>/* OpenMessage method - the $message argument indicates the number of
a message to be opened. The $lines argument tells how many lines of
the message are to be retrieved. Pass a negative number if you want
to retrieve the whole message. */</pre>
but it appears that OpenMessage does not actually return anything but an error, if there is one. Is that correct ?
If not, how is the message returned ?
william drescher - 2007-06-01 12:47:44 - In reply to message 1 from william drescher
Further: What I want to do is retrieve a message using pop3_class and then pass it to mime_parser_class for decoding. get_message appears to not be the correct way of getting the message as it splits the headers from the body and it seems that mime_parser wants the raw message.
Perhaps you would be so kind as to post a very simple script that shows the integration of pop_message_class and mime_parser_class to get one message and decode it ?
Thanks for writing the classes and for the continuing support.
william drescher - 2007-06-01 19:11:15 - In reply to message 5 from Manuel Lemos
I got it !
The $lines parameter in OpenMessage says how large the chunks will be when one calls GetMessage.
Question: IN using the streams handler in POP3_class:
$message_file='pop3://'.$user.':'.$password.'@localhost/'.$message. '?debug='.$debug.'&html_debug='.$html_debug.'&realm='.$realm.'&workstation='.$workstation. '&apop='.$apop.'&authentication_mechanism='.$authentication_mechanism;
if the ISPs mail server is 'pop.mailserver.com', and
my account is 'email@example.com', and
my password is 'password',
william drescher - 2007-06-01 19:35:31 - In reply to message 5 from Manuel Lemos
I am still confused:
OpenMessage has a $lines parameter, which can be set to -1 to indicate all lines.
Get Message has a $count parameter that must be set to a number of characters.
I presume from testing that this is a max number and need not be an exact number. Correct ?
I still don't see the utility of the $lines parameter.
Manuel Lemos - 2007-06-01 21:33:07 - In reply to message 7 from william drescher
The $lines parameter should be set to -1 unless you only want to receive the first few lines that you specify.
The $count parameter defines the limit size of the chunks of the message that you will retrieve on each call to the GetMessage function. Set it to no more than a few tens of K so you do not exceed the memory limits set in PHP configuration when you are retrieving large messages.