Poco Forwarding Mail FAQ - Truncating forwarded messages

Q: I would like to be able to truncate messages before forwarding them.

For example, I would like to forward messages from certain people I set up in a filter to my cellular phone. Since the phone only accepts 110 character messages (Alot of messages never make it because they are too long), I would like to strip the remaining message. This may not sound to cool, but alot of times during the day I may be waiting on a certain response or maybe need to see a preview to a message to understand the urgency when I am out of the office or in another area of the building.

 
A:
Although you certainly could truncate a message using a script you may still encounter problems. I don't know how the cell phone provide handles message headers.

To truncate a message via an outgoing message script you should setup a filter to fire the script only when the message is being sent to your cell phone. The following (untested) script code will truncate the message for you:

ReadBody $body %message CharCount #size $body If #size < 110 Then Done ClearBody %message ChopString $body 111 #size AssignBody %message $body <p> :Done Exit PS: You may need to alter the size at which the message is truncated in order to take message headers into account. To do so you will need to change the script in two places, the "If" statement and the ChopString statement.

Followup question

The script works well, and the messages are coming in on the phone just fine. I do have a question about how the script treats the message.

I have a filter set up to do the following:

  1. Copy message to a particular folder for filing.
  2. Run the script.
  3. Forward message to cellphone email address.
-The message in the inbox is correct and not truncated, but the message that is copied to the folder for filing is truncated. Can that be reversed or anything?

I haven't studied the pocoscripting at all yet and was hoping this may be a simple answer.

Answer to followup question

I would suggest a slight modification to your filters:

  1. Change the incoming message filter to:
    1. Forward the message to your cell phone
    2. Copy (or move) the message to the folder. Copy will create duplicates which you may not want.
  2. Add an outgoing message filter.
    Search for: To - You cell phone address
    Actions:
    1. Run the script.
    2. Move the message to a folder (or delete it - but only do this if you don't send messages there yourself, but then why would you?).