-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Email templates are in HTML, but are not sent as HTML #4
Comments
JoeGermuska
added a commit
that referenced
this issue
Sep 7, 2023
…edit is handled correctly and consistently for NHC as well as NWS. TODO: cleanup email template rendering, see #4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The various email templates are in HTML files, but when they are sent, they are not sent in a way which that signals a receiving client to render them as HTML. There's also some code that pulls text out of
<p>
tags, which kind of undoes the HTML. Seeweatherbot/NHC.py
Lines 322 to 324 in 54eefc2
(I also wonder if the
<ul>
content of some email templates comes through that process looking as we'd like it to.)We could change the templates to be plain text, although formatting lists in ASCII is a pain; or we could use more advanced methods of the python
email.message
library to send the email as HTML, which is a different kind of a pain.But if we are sending the messages as text, we should use text templates, and not HTML templates with a custom process for reducing the templates to plain text.
The text was updated successfully, but these errors were encountered: