php3-list | 199908

[PHP3] Re: read attachment with php3 From: Manuel Lemos (mlemos <email protected>)
Date: 08/31/99

Hello Arisandy,

On 31-Aug-99 11:09:30, you wrote:

>how can I read attachment fom mail message
>using php....is there any class support it??

I haven't written such class as I still haven't had the need for it.

Anyway, basically what you need to is to look in the message headers for
the Content-Type to see if it is a multipart message. If so, you have to
look in for the message part separator that is defined in the header too
and find it to determine where the attachement part starts and ends.

Then depending on the encoding type you need to extract and decode if you
want to show it somehow. The most used encoding type is base64. If that
is the case you only need to use PHP's base64decode to extract the attached
file.

Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: email protected>?subject=Re:%20[PHP3]%20Re:%20read%20attachment%20with%20php3&replyto=1006.912T2928T7346493mlemos <email protected>">mlemos <email protected>">http://phpclasses.UpperDesign.com/?user=mlemos <email protected>

--
E-mail: mlemos <email protected>
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>