Skip to content

[_]: fix: integrate html-to-text for email body conversion#79

Merged
jzunigax2 merged 1 commit into
masterfrom
fix/smtp-include-html-as-well-as-raw-text
Jul 3, 2026
Merged

[_]: fix: integrate html-to-text for email body conversion#79
jzunigax2 merged 1 commit into
masterfrom
fix/smtp-include-html-as-well-as-raw-text

Conversation

@jzunigax2

Copy link
Copy Markdown
Contributor

Email bodies were handed to SMTP layer as the text field. Nodemailer therefore built a text/plain message, so external
clients displayed the markup as is. The fix is to send the decrypted HTML as the html part and derive a plain-text alternative from it, so the message goes out as multipart/alternative

Changes:

  • Added html-to-text package to convert HTML email bodies to plain text alternatives.
  • Updated EmailService to handle HTML content in emails, ensuring both HTML and plain text formats are sent.
  • Enhanced unit tests to verify the new email sending behavior with HTML content.

@jzunigax2 jzunigax2 self-assigned this Jun 30, 2026
@jzunigax2 jzunigax2 added the bug Something isn't working label Jun 30, 2026
- Added `html-to-text` package to convert HTML email bodies to plain text alternatives.
- Updated `EmailService` to handle HTML content in emails, ensuring both HTML and plain text formats are sent.
- Enhanced unit tests to verify the new email sending behavior with HTML content.
@jzunigax2 jzunigax2 force-pushed the fix/smtp-include-html-as-well-as-raw-text branch from f3834d6 to d8437d6 Compare July 3, 2026 12:58
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@jzunigax2 jzunigax2 merged commit c5ed582 into master Jul 3, 2026
5 checks passed
@jzunigax2 jzunigax2 deleted the fix/smtp-include-html-as-well-as-raw-text branch July 3, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants