[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 attachment to a specific folder

Save attachment to a specific folder

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Save attachment to a specific folder

Postby mikeu » Sat Apr 11, 2009 5:43 am

I am hoping to find a method to save attachments to specific folders as they are filtered.
e.i. Mail from ABC Co. with attachment, attachment is saved to existing ABC folder, Mail from XYZ Co. with attachment, attachment is saved to existing XYZ folder.
Has anyone done this?

Mike
mikeu
New Arrival
 
Posts: 1
Joined: Sat Apr 11, 2009 4:51 am

Postby Tomas » Sat Apr 11, 2009 11:12 am

I think it might have been discussed here in the past.

Filters don't have an action to save attachmentt. Scripts have a way of deleting attachments, but not a way of saving them.

So far I could only think of this way:
- set Pocomail to "Extract attachments from incoming email" by default

then you could use following script command:
ReadAttached $a %m
Reads the list of attached files in the message %m, and places their filenames with full path into $a. Each file is placed onto a separate line in $a. This command works by scanning the end of the message for string

You could write a script that will get a list of attached files extracted to the Attach directory, it will than either copy them to the folder you wish, or it will move them and subsequently will also change the header line that says where the attachment is stored.
Tomas
Tomas
Pillar of the Community
 
Posts: 1418
Joined: Sun Jul 25, 2004 1:34 am


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 3 guests

cron