[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 - Multiple-Recipients Indicator

Multiple-Recipients Indicator

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

Multiple-Recipients Indicator

Postby Pete » Mon Nov 15, 2004 4:58 pm

This script will let you know if a message is addressed to multiple recipients. It does this by counting all of the TO/CC/BCC addresses and putting the letter "M" in a custom column in the index pane if there is more than one recipient. Of course, it will only know about BCC addresses for outgoing messages, not for incoming ones.

For example:
Image

I like to have this indicator in the index pane so that I don't have to display any headers in the preview pane. The next script that I post will offer a quick way to see all of the TO/CC/BCC Full Names and Email Addresses in a message box. Again, this is also to avoid the need to display headers in the preview pane.
EDIT: okay, I've posted the "Show Recipients" script that shows the message box:
http://pocosystems.com/forum/viewtopic.php?t=1280

The instructions are in the script:
Code: Select all
{  Script: Multiple Recipients Indicator.poc
{  Author: PJR
{ Written: 15 Nov 2004
{
{ This script will let you know if a message is addressed to multiple recipients.
{ It does this by counting all of the TO/CC/BCC addresses and putting the
{ letter "M" in a custom column in the index pane if there is more than one
{ recipient.  Of course, it will only know about BCC addresses for
{ outgoing messages, not for incoming ones.
{
{ To use this script:
{
{    1) In "Tools > Options > Index Columns", click on the "Column Setup"
{       tab and type X-PeteMultiple in one of the three fields.  Click on
{       the "Column Visibility" tab and enable the corresponding custom
{       column.  Click OK.
{
{    2) Verify that you can see this new column in all desired mailboxes.
{       If not, then right-click on the mailbox, click Properties, click
{       the "Columns" tab, and enable the appropriate custom column.
{
{    3) Drag the column to the desired position.  Also, the width of this
{       column only has to be as wide as the letter M.  (M stands for Multiple.)
{       On my screen, I only see a dot (.) in the column header.  This is
{       okay because you know what it is.
{
{    4) Put this script in your Scripts folder.
{
{    5) Call this script in your Incoming Filters and in your Post-Send Filters.
{
{ That's it.  If you want to add the M to existing messages, you can
{ manually run this script against selected messages
{ (via "Tools > All Scripts Run").  It will only add the M to the
{ messages that are addressed to multiple recipients.

Set $OnErrorMessage ""
AddStrings $OnErrorMessage "Error in " $pocoScriptName
Set $OnErrorGoTo "POCO_ERROR"

DeleteHeader "X-PeteMultiple:" %message
Set $addressList ""

ReadTo $tmpList %message
AddStrings $addressList $tmpList
ReadCC $tmpList %message
AddStrings $addressList $tmpList
ReadBCC $tmpList %message
AddStrings $addressList $tmpList

LineCount #addressListSize $addressList
If #addressListSize < 2 Then DONE
AddHeader %message "X-PeteMultiple:" "M"
If #pocoScriptMode ! 5 Then DONE
SaveMessage %message $currentMailbox
DeleteMessage %message

:DONE
Exit

:POCO_ERROR
Exit
Last edited by Pete on Tue Nov 16, 2004 1:38 pm, edited 1 time in total.
Pete
 

Postby Sandy » Tue Nov 16, 2004 4:49 am

Pete, altho I don't need this function exactly.....I love your idea of adding a column to the index pane to display a custom header to avoid having to look at all the headers!

I have several scripts that indicate msgs which have certain characteristics by modifying the subject header. I add a code to the start of the subject so that I can easily see the affected msgs. This works great, but it has the disadvantage of modifying the subject so that if I reply to the msg, I have to remember to delete that code from the subject.

I have now modified these scripts to add a special indicator header which I then display in the index pane ala your idea. WAY better......thanks.
Sandy
 

Postby Eric » Tue Nov 16, 2004 5:18 am

Thanks Pete. :wink:
That was quick. I'll try it out this evening.

Edit: Works like a charm. :D
Eric
 

Postby Pete » Tue Nov 16, 2004 1:09 pm

You're both welcome. I'm glad that it was directly or indirectly helpful.
Pete
 


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 0 guests

cron