[MlMt] When MailMate opens mail from a MailMate user
Kee Hinckley
kee+freron at hinckley.com
Tue Feb 18 15:14:06 EST 2014
When it comes down to it, the main reason I'm using MultiMarkdown is
that I need to be able to reply to HTML emails without losing the HTML.
I can't blow away the table my manager sent me in a reply. I don't need
to edit it--it's Exchange, nobody inline replies--but I can't let it get
nuked--especially since that screws up the entire assumption that if you
have the most recent message, you can delete all the others.
So what is necessary for MailMate to be usable in this environment?
Ideally, the ability to top-reply to a mail message and have the HTML
being replied to appear in a pane in the bottom, with the two merged
when I send the message.
Until then, I do the following.
```
{ name = 'HTML to SemiCanonical';
events = ( 'email.reply', 'email.forward' );
input = 'html';
output = 'canonical';
select = "content-type.type = text and content-type.subtype = html and
from.domain = 'tivo.com'";
script = '#!/usr/bin/env bash\n/Users/nazgul/bin/t\n';
uuid = '5DF480C9-2400-427A-9B01-52391F84DC7B';
disabled = 0;
}
```
and the script
```
#!/usr/bin/env bash
tidy --quiet yes --wrap 0 --input-encoding utf8 --output-encoding utf8
--force-output 1 --show-warnings no | \
perl -e '
while (<>) {
s/<\/?(head|meta|html|!DOCTYPE|title)[^>]*>//ig;
s/<\/?html[^>]*>//ig;
s/<body/<div/ig;
s/<\/body/<\/div/ig;
print;
}
'
```
That brings up some manageable HTML in the window, which MailMate then
prefixes with '> ', which MultiMarkdown then turns into wrapping with
block quote tags. Last time I tested, sundown didn't handle quoting HTML
that way. If that changed, this would work with it as well. (For a
while, I had the script generate a set of editor actions which selected
the content of the message, removed the '> ' and wrapped it with
blockquote tags, but that was more than a little hacky.
Of course, this is all hacky, but otherwise I wouldn't be able to use
MailMate at work.
P.S. Benny, have you considered sending the CSS you use to display
messages along with the HTML message? So that things like blockquotes
appear to the receiver the same way they appear in MailMate, even if
they don't have MailMate.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20140218/9639b29e/attachment.html>
More information about the mailmate
mailing list