A way to strip certain text from incoming email in Mail.app (Mac Mail)?

2

I receive a large number of emails from a particular client of mine. These emails all come with a fairly long standard disclaimer at the bottom. When I print these emails, Mail makes a complete bodge of it due to the long line length of the disclaimer. None of the three formatting options 'rewrap','scale','keep apparent font size' really help, the main part of the message remains in some impossible-to-read tiny font.

I've taken to starting to forward the message, manually deleting the disclaimer text, printing the message, then discarding it. How utterly stupid.

Does anyone know of a way I could get the disclaimer text removed when the email arrives? Perhaps something in Applescript that I could 'run' on the mail folder where their messages are directed to? The text is always the same so I'm guessing some kind of 'find this text and replace it with nothing' would do the job, although whether or not you can edit original emails like this is something I don't really know.

By the way, getting the client to change their message is out of the question I'm afraid. I wish! :-(

robsoft

Posted 2009-08-08T11:08:27.567

Reputation: 646

1Maybe there's some examples in /Library/Scripts/Mail Scripts/ And I actually might start to add such ridiculous non-printable disclaimer to my own messages, pointing out to consider the environment before printing the message. :-) – Arjan – 2009-08-08T11:42:31.667

@Arjan, thanks for the suggestion, I'll have a look. I think the stumbling block will be modifying the original email itself - I suspect I can't do that. As far as the environment is concerned, I don't normally print emails but the ones from this client are frequently 'specs' for small pieces of work, and I print them so that I a) have a written document to work from, and b) have a record we can file away for future accounting & auditing purposes. – robsoft – 2009-08-08T13:26:29.030

Answers

1

Not really an answer to your question, but some pointers.

If there are some tools available which will achieve what you want, I'm sure they are listed on Hawkwings.

If I would write something you'd want, i would look into procmail. Your mail messages are eventually stored inside your ~/Library folder (as seperate mails I believe), so it's definately possible to tamper with them.

Again, I would check first if there is an add-on available which fits your needs :-)

Ben

Posted 2009-08-08T11:08:27.567

Reputation: 474

Thanks Ben, I've flicked through Hawkwings before but will have another look. I could probably write something if it were Windows (I'm a Delphi developer) but my Mac coding skills (at the moment) are non-existent. Could be an interesting starter project, though... :-) – robsoft – 2009-08-22T07:27:58.807