Skip to content
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

Fix: Favor HTML content instead of plain text #115

Merged

Conversation

Hugoch
Copy link
Contributor

@Hugoch Hugoch commented Feb 16, 2024

Hi,

On some email clients, plaintext attachment is shown instead of HTML (eg. Gmail). It is related to the correct interpretation of RFC 2046 5.4:

As with "multipart/mixed", the order of body parts is
significant. In this case, the alternatives appear in an order of
increasing faithfulness to the original content. In general, the
best choice is the LAST part of a type supported by the recipient
system's local environment.

To get HTML templates rendered as the default, we must attach plain-text message first, then HTML.
This PR updates the attachment order to get HTML first.

@Hugoch Hugoch requested a review from neilmunday as a code owner February 16, 2024 13:58
@neilmunday neilmunday self-assigned this Feb 17, 2024
@neilmunday neilmunday added this to the 4.12 milestone Feb 17, 2024
@neilmunday neilmunday changed the base branch from main to 4.12 February 17, 2024 20:54
@neilmunday
Copy link
Owner

Thank you for this pull request @Hugoch and for the explanation - it will be included in the 4.12 release.

Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/slurmmail
  cli.py
Project Total  

This report was generated by python-coverage-comment-action

@neilmunday neilmunday merged commit 692c9b2 into neilmunday:4.12 Feb 17, 2024
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants