[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - Save File/Attachment, Add Header ref, & Remove from Mess

Save File/Attachment, Add Header ref, & Remove from Mess

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Save File/Attachment, Add Header ref, & Remove from Mess

Postby atangel » Sat Dec 04, 2004 2:16 pm

New to Poco and evaluating it.

I'd like to get all my imported mail to put its attachments into the attach folder and shrink my mailbase (there's lots and lots and lots of mail and I think that is what is impacting Poco's performance, it is slow to retrieve, slow to search, etc).

FYI--Current The Bat User.

I've been playing with the script (very similar to one at work we use, reverse polish notation and all).

I've found a wealth of scripts on removing attachments, reattaching, and manipulating them (fantastic) but nothing on splitting them off.

In looking at the script, what has got me is how to save it as a file. where is SaveAttachment, or WriteToFile? or some routine similar? It would be a great keyword (SaveAttachment adds an X-poco header, saves the file to X, and removes it from the base if you SaveMessage, yadda, yadda, yadda)

Any help appreciated.
atangel
Drop-in Visitor
 
Posts: 11
Joined: Sat Dec 04, 2004 6:34 am

Re: Save File/Attachment, Add Header ref, & Remove from

Postby Michael » Sun Dec 05, 2004 6:04 pm

atangel wrote:New to Poco and evaluating it.

I'd like to get all my imported mail to put its attachments into the attach folder and shrink my mailbase (there's lots and lots and lots of mail and I think that is what is impacting Poco's performance, it is slow to retrieve, slow to search, etc).

FYI--Current The Bat User.

I've been playing with the script (very similar to one at work we use, reverse polish notation and all).

I've found a wealth of scripts on removing attachments, reattaching, and manipulating them (fantastic) but nothing on splitting them off.

In looking at the script, what has got me is how to save it as a file. where is SaveAttachment, or WriteToFile? or some routine similar? It would be a great keyword (SaveAttachment adds an X-poco header, saves the file to X, and removes it from the base if you SaveMessage, yadda, yadda, yadda)

Any help appreciated.


Unfortunately there isn't a SaveAttachment command (yet, it has been requested as an enhancement in Bug Traction). To write to a file use the SaveBody command (I have only used this for text files, I'm not sure if it would work for a binary file).
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada

Postby atangel » Mon Dec 06, 2004 1:40 am

Thanks Michael, then I think I'm beat for now, though I think I a python script would do ( :) ). Too much work! But maybe if I get bored this week.....

Thanks for the reply.
atangel
Drop-in Visitor
 
Posts: 11
Joined: Sat Dec 04, 2004 6:34 am


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron