Opened 11 years ago
Closed 11 years ago
#11927 closed defect (fixed)
Email distributor generates wrong Content-Type header for text/html
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.4 |
| Component: | notification | Version: | 1.1.3 |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: |
|
||
| API Changes: | |||
| Internal Changes: | |||
Description
I'm trying to add support of new notification system to th:TracHtmlNotificationPlugin (th:#12158).
Email distributor says sending event as text/html. However, Content-Type header in notification is text/plain.
04:46:34 PM Trac[mail] DEBUG: EmailDistributor is sending event as 'text/html' to: jun66j5@gmail.com
MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Trac-Realm: ticket From: "My Project" <trac@localhost> X-Trac-Version: 1.1.3 Precedence: bulk Auto-Submitted: auto-generated X-Mailer: Trac 1.1.3, by Edgewall Software To: undisclosed-recipients: ; References: <011.5820a89cc2c970d854f42757ba2afba4@localhost> X-Trac-Project: My Project In-Reply-To: <011.5820a89cc2c970d854f42757ba2afba4@localhost> Date: Thu, 22 Jan 2015 07:53:18 -0000 Reply-To: trac@localhost Message-ID: <026.b9afbec2d2e7f31d7df1cbbfe0b5fa89@localhost> X-URL: Subject: Re: [My Project] #1: test <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ...
Attachments (0)
Change History (5)
follow-up: 2 comment:1 by , 11 years ago
follow-up: 3 comment:2 by , 11 years ago
Ideally we would create a multipart message with text and html.
Yeah. I tried it. See [d9207b9b/jomae.git].
comment:3 by , 11 years ago
Replying to jomae:
Ideally we would create a multipart message with text and html.
Yeah. I tried it. See [d9207b9b/jomae.git].
Looks great!
comment:4 by , 11 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
Updated jomae.git@t11927 branch.
- Added unit tests for
trac.notification.mail - Fallback to text/plain when
INotificationFormatterfails
comment:5 by , 11 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
Committed in [13689].



Right,
EmailDistributordoes not currently support HTML emails. I think at least we would have to pass'html'toMIMEText:trac/notification/mail.py
Ideally we would create a multipart message with text and html.