Re: Creating HTML emails with mutt

2019-10-26 Thread Kevin J. McCarthy

On Sat, Oct 26, 2019 at 11:16:25AM +1300, martin f krafft wrote:
I need to start sending out `text/html` alternative parts to my 
messages with mutt.


Hi martin,

Native support for multipart/alternative composition isn't in my todo 
list.  However, I do have a plan to allow external filter generation of 
the alternative.  Originally, this was on my list for the next 
development cycle, but let me see what I can do before the 1.13 release.


The current idea is a quadaption (names may change, but...) 
$compose_multipart_alternative combined with a script 
$compose_multipart_alternative_script.


The script would be run post-compose menu, after checks such as 
$abort_noattach and $abort_nosubject, but before signing/encryption; it 
would not be run when postponing.


If there were an error sending, the alternative would be stripped before 
returning to the compose menu.  So it would not be exposed to the 
compose menu.  I *might* add a function to preview the output as raw 
text and via mime from the compose menu though.


Script output would be the content-type, a blank line, then the 
generated content.


Anyway, that's my current plan.  The problem is cleaning up some other 
parts of mutt to deal with bouncing, reuse as a template, etc.  So, 
again, not sure I can deliver this before 1.13.


--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA


signature.asc
Description: PGP signature


Re: Creating HTML emails with mutt

2019-10-26 Thread martin f krafft


Regarding the following, written by “Amit Ramon” on 2019-10-26 at 09:03 Uhr +0300:

A few years back I developed a simple filter that does, more or less, what you’re looking for.
[…]
https://github.com/amitramon/plainMail2HTML

Thanks for the pointer. If messages aren’t PGP/MIME-signed, then both muttdown and my own tool work just fine. The question is more about how it should be done properly, than it is about which tool can do this.
Thank you anyway, and I do wish I had seen your work (and muttdown) before writing it all up by myself.
-- @martinkrafft | https://riot.im/app/#/room/#madduck:madduck.net heisenberg may have been here. spamtraps: madduck.bo...@madduck.net



Re: Creating HTML emails with mutt

2019-10-26 Thread Amit Ramon

martin f krafft  [2019-10-26 11:16 +1300]:


Folks,

I need to start sending out text/html alternative parts to my messages with
mutt. However, this is a rabbit hole, so if you’re afraid of those, stop
reading now.

My requirements are, in decreasing order of priority:

1. Compatible with all Gmail, Outlook, Hotmail, Apple Mail, Thunderbird, and
   whatever else many people are using these days.
2. Markdown processing of text/plain
3. multipart/alternative result, MIME compliant
4. Attachments
5. Sensible integration with mutt
6. PGP signatures
7. Inline images

and after surveying the field, and spending hours with the solutions I found
during various web searches, I am writing in to you for some feedback, input,
guidance, psycological help, and maybe even some hugs.


A few years back I developed a simple filter that does, more or less,
what you're looking for. I believe it fulfills your first 5
requirements. I've not designed nor tested it with PGP signatures or
inline images.

It serves as a replacement to Mutt's sendmail command, it processes the
text using reStructuredText (that should be easily switched with
markdown), and the result is a multipart/alternative that contains the
original message as text/plain and a text/html.

I don't know how well it complies with standards, and I haven't tested
the resulted mail with all possible email clients. I believe it works
well with Gmail and thunderbird.

If this sounds interesting, you can find it at

https://github.com/amitramon/plainMail2HTML

Hope it helps,

Amit