[MlMt] Inject custom javascript into Message View

Padraic Renaghan prenagha at renaghan.com
Tue Jun 13 10:38:58 EDT 2017


> File in the MailMate bundle named `eventFilters.plist`. For experimenting

Thanks. I will try experimenting. I think I get the basic eventFilter calls to bundle via UUID idea. Any help you can provide on what the current events mean, or point me to the one I should try hooking up to first would be appreciated.

> It could be very tricky to identify exactly where the signatures are located.

Yes, I certainly am not going to try to do a generalized signature feature. Just routine junk I see all day (from my employer). And do something like:

```start = message.indexOf('start of legal nonsense');
end = message.indexOf(start, 'end of legal nonsense');
if ( (end-start) between (100, 110)) {
  // strip it out
}```



2017-06-13 10:00 EDT from Benny Kjær Nielsen:

> On 13 Jun 2017, at 15:29, Padraic Renaghan wrote:
>
>> Any way to filter the message prior to loading it into the MM Web View?
>
> Kind of...
>
>> Is that what the premailer is about?
>
> Not quite. It's a filter, but premailer is about inlining CSS. This is needed, because HTML really wasn't designed to allow embedding one HTML email within another.
>
>> Can I customize that?
>
> There's a file in the MailMate bundle named `eventFilters.plist`. For experimenting, you can use this to inject your own bundle commands, but there's currently no `html_to_html` event which is kind of what you need. I do think though that what you are trying to do might be harder than you think. It could be very tricky to identify exactly where the signatures are located.
>
> Note that I've played a bit with hiding sections. See `MmShowQuotedTextLimit` in [the manual](https://manual.mailmate-app.com/hidden_preferences#visual-appearance).
>
> -- 
> Benny


> _______________________________________________
> mailmate mailing list
> mailmate at lists.freron.com
> https://lists.freron.com/listinfo/mailmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20170613/e0c9ecd6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3522 bytes
Desc: S/MIME digital signature
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20170613/e0c9ecd6/attachment-0001.bin>


More information about the mailmate mailing list