[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 - Export all subjects

Export all subjects

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Export all subjects

Postby ferent » Wed Nov 07, 2007 8:28 pm

Hi people;

I need to export all the email´s subject I´ve got with certain text on it to a TXT or CSV...

For example, if I have 300 emails starting with subject:

"Hello world [...]"

I want to locate and export THE SUBJECT and DATE from each email.

Is possible to do something like that?

Sorry for my bad english
Alfredo Fernandez
ferent
Resident Poster
 
Posts: 188
Joined: Sun Jan 30, 2005 7:29 am
Location: Spain

Postby Tomas » Thu Nov 08, 2007 11:59 am

Code: Select all
AppendToFile True
ReadHeader $subject "Subject:" %message
ReadHeader $date "Date:" %message

AppendBody $msg $subject
AppendBody $msg $date

WriteCSV $out $msg

SaveBody $out "out.txt"


the out.txt will be created most probably in Mail directory
As for the hello world filtering, that you can do through quick focus box, next select all messages that were filtered and run the script
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 2 guests

cron