[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 - A script to sort by address group

A script to sort by address group

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

A script to sort by address group

Postby dazbo » Thu Jul 05, 2007 1:37 am

Hi,

I was looking for a method to file my mail using groups, instead of separate address books, makes it a lot easier for me.

So i wrote this short script for anyone to use. its not perfect but its the first draft...

Code: Select all
{ Script Name   :   Sort by Group
{ Author        :   Dazbo
{ Creation Date :   5th July 2007
{ Version       :   1.0
{ Usage         :   Mode: Incoming, Outgoing, Post-Send or Selected
{ Description   :   Save sent messages contained in specified group to specified folder
{ Input         :   None
{ Notes         :   This script requires setup with the script setup function.
{                              Also for more groups this file will have to copied to different file names                                 
{
{ Revision History :
{ Date        Change ID       Developer
{             Description
{ ---------  ---------------  ----------------------------------------------

{ --------------------------------------------------------------------------


External $AddressBook "Address book%addressbooks%" "Test"
External $DestinationMailbox "Destination mailbox%Mailboxes%" "Test"
External $Group "Name off Group to check" "Forums"

ReadHeader $Address "From" %Message
ExtractEMail $Address

{check if address is in the specified group
GroupList $groupnames $Address $AddressBook
LocateLine #n $Group $groupnames

if #n > -1 then MovetoMailbox

{not found just exit
exit

:MovetoMailbox
{move the message to the selcted mailbox
Set $Mailbox $DestinationMailbox
AppendToFile True
SaveMessage %Message $Mailbox
DeleteMessage %Message

exit


Cheers
Dazbo
dazbo
Drop-in Visitor
 
Posts: 13
Joined: Thu Dec 14, 2006 7:32 am

Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron