I have a PHP script in which I can send e-mail messages with attachments (BASE64 enconding).

Now I want to make the receive part, and I don't know how the decode the attachment and convert it back to a file. I've tried to use the base64_decode() function, but it doesn't work. The image (which was the attachment I've used for testing) doesn't show up...

Does anyone have any ideas for getting this script working?

Thanks in advance!


[P.S. - By the way...I can't use IMAP nor PEAR. I'm using an old-fashioned socket connection, working directly with POP3 commands. I know that this is not efficient, but I'll have to stick with this method!]