I'm having a lot of problems trying to decode MIME and UU-Encoded attachements in a webmail interface that I'm writing.

Does anyone know of any webmail clients that use PHP (that have source code available and decode attachments)?

I already know about IMP but can't figure out the source - and it only deals with MIME not UUEncoded attachments.