[PR #623] [CLOSED] allow publishing of text/html emails #1356

Closed
opened 2026-05-07 01:01:44 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/623
Author: @tamcore
Created: 2/20/2023
Status: Closed

Base: mainHead: feature/publish-html-mails


📝 Commits (2)

  • 893360d allow publishing of text/html emails
  • 5ac44ff replace html2text package with a basic regex; reorder text/html processing to be last

📊 Changes

2 files changed (+82 additions, -0 deletions)

View changed files

📝 server/smtp_server.go (+23 -0)
📝 server/smtp_server_test.go (+59 -0)

📄 Description

This allows publishing of emails with Content-Type: text/html type, by quickly converting them to plaintext. I ran into this issue, when i tried to point my traccar instance's email notifications towards my ntfy instance.

Container image to test ghcr.io/tamcore/ntfy@sha256:caa2c16b9eef9fd6a3d32e9b4621bb32218198fb5931481f3b96ce72819f22b0


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/623 **Author:** [@tamcore](https://github.com/tamcore) **Created:** 2/20/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/publish-html-mails` --- ### 📝 Commits (2) - [`893360d`](https://github.com/binwiederhier/ntfy/commit/893360da284dca97f02ee066677eadf1fa7b097d) allow publishing of text/html emails - [`5ac44ff`](https://github.com/binwiederhier/ntfy/commit/5ac44ff40f33ab764c62667bf75d58ade282cab7) replace html2text package with a basic regex; reorder text/html processing to be last ### 📊 Changes **2 files changed** (+82 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/smtp_server.go` (+23 -0) 📝 `server/smtp_server_test.go` (+59 -0) </details> ### 📄 Description This allows publishing of emails with `Content-Type: text/html` type, by quickly converting them to plaintext. I ran into this issue, when i tried to point my [traccar](https://github.com/traccar/traccar) instance's email notifications towards my ntfy instance. Container image to test `ghcr.io/tamcore/ntfy@sha256:caa2c16b9eef9fd6a3d32e9b4621bb32218198fb5931481f3b96ce72819f22b0` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:44 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#1356
No description provided.