Poco Reading FAQ - Editing received messages

Q: How can I edit a message I have received AS WELL as sent.

Before archiving messages to a specific folder, I often clean them up, remove what is not important. I tried to edit the messages, but Poco seems to think that they are edited in order to be sent. Not to just be modified and saved back to the In or Out folders...

Also, of course, editing the messages should not change the date/time stamps.

 
A:
I think the only way that this could be achieved would be by using a script that runs against selected messages. Assuming for the moment that you do not receive styled messages you could extract the message body using the ReadBody command, save it to a file, display it using your favorite text editor (using the "ExecuteAndWait" command to pause until you've finished editing it) and then retrieve the contents of the saved file, replace the body of the message and save it back to it's original location. It's not as bad as it sounds.

Handling both plain and styled messages would differ only in that you would have to examine the message header, extract the body for styled messages using the "ReadRawBody" command and use your favourite html editor to edit them.

The following is "air code", it has not been tested:

{ Script to edit the body of a message and save the changes 

ReadBody $body %message 
AppendToFile False 
AddStrings $file $temppath "msgbody.txt" 
SaveBody $body $file 
ExecuteAndWait $file 
OpenBody $body $file 
ClearBody %message 
AppendToFile True 
SaveMessage %message $currentmailbox 

Note: Do not select any text in the message prior to running this script. If you do only the selected text is passed on to the script. (This is just a caution for using this script).

Suggested enhancements:

  1. Add the capability to process styled messages.
  2. Add a prompt (using InputBox) to ask whether or not the changes should be saved (or perhaps examine the contents of the body after reading it using the OpenBody command, if it hasn't changed then do not replace it).