Adding attachments using PEAR

Web Warrior's picture

He has: 29 posts

Joined: Oct 2006

Hello,

I am writing a script that will email be backups of my websites.

I am going to add a zip file as an attachment to an email using PEAR.

To add zip attachments using PEAR I normally use:
$mime->addAttachment($file, 'application/zip');
where $file is the path to a file stored on the server.

Supposing I have the zip file stored in a variable e.g. $zip_file.

Does anyone know how to attach it without saving it to disk first?

Anyone know of a good online PEAR manual?

Megan help!

Web Warrior's picture

He has: 29 posts

Joined: Oct 2006

I'm getting there. Just found this: http://devzone.zend.com/node/view/id/1052

Anyone's help would be appreciated.

Andrew.

Web Warrior's picture

He has: 29 posts

Joined: Oct 2006

I'm still stuck. Come on Jeeves! You must know this one.

Web Warrior's picture

He has: 29 posts

Joined: Oct 2006

Well I think I'm able to work it out now from: http://beeblex.com/lists/index.php/php.pear/223?s=l%3Aphp.pear

but any comments will be appreciated.

Web Warrior's picture

He has: 29 posts

Joined: Oct 2006

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.