open-contracting / credere-backend

A tool that facilitates the participation of Micro, Small, and Medium businesses (MSMEs) in the Colombian public procurement market.
https://credere.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

mail: Email deliverability: Set the text part #360

Open jpmckinney opened 4 weeks ago

jpmckinney commented 4 weeks ago

AFAIK, we presently only set the HtmlPart (the templates don't have a TextPart).

Emails with only HTML parts can be marked as spam (e.g. https://glockapps.com/blog/10-tips-to-avoid-spam-folder/)

yolile commented 3 weeks ago

What do you suggest to put as TextPart?

jpmckinney commented 3 weeks ago

Probably the same content with the same {{VAR}} tags, split into paragraphs. Basically, the same without HTML.

One idea is to write a command to strip the HTML to autogenerate these files (there's probably a library to do it).

We can then double-check that the text looks OK, and this will make it easier to keep them in sync going forward.

Edit: and we probably want to use the textwrap module to have reasonably short line lengths.