Feature #6221

Email texts template/configuration.

Added by Joël Lamotte about 7 years ago. Updated over 2 years ago.

Status:NewStart date:2010-08-26
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Email notifications
Target version:-
Resolution:

Description

Currently the email's subject and texts generation is hardcoded : http://www.redmine.org/boards/1/topics/13811?r=13844#message-13844

Add config file and/or admin interface to setup subject and email format.

Among other things, this feature would help having a simple and flexible way to make sure any email (web)client can group emails related to the same issue for example, based on the emails subject. (for example gmail don't group current email notifications because the generated email subject change for each notification...).


Related issues

Related to Redmine - Feature #2026: Improve E-Mail notification templates New 2008-10-12

History

#1 Updated by Eric Davis about 7 years ago

  • Category set to Email notifications

It would be difficult to allow these to be customized. Since they deal with data from users, they would each need to be sanitized.

My mail client threads emails from Redmine correctly based on the internal email headers that Redmine generates.

#2 Updated by Joël Lamotte about 7 years ago

Eric Davis wrote:

It would be difficult to allow these to be customized. Since they deal with data from users, they would each need to be sanitized.

Is it a problem to sanitize this?
A user-defined template/config file directly on the server would be a solution making sure that the templates have been setup by some kind of web admin?

My mail client threads emails from Redmine correctly based on the internal email headers that Redmine generates.

Don't seem to be the case for gmail. :/

#3 Updated by Terence Mill about 7 years ago

This is realated to Issue #2026

#4 Updated by Yuki Sonoda over 6 years ago

I am trying to write a patch which solve this issue. It is not hard to add UIs for templates which Redmine uses. However there are two problems.

  • mail body needs a powerful template language to write. But powerful language like ERb allows administrator to write a dangerous template, e.g., breakage of RFC or some security issues. Also powerful languages are hard to learn.
  • Mail subject is easier. It needs only a simple expression language. Simple language like "[%<project-name> - <tracker-name> #<issue-id>] (%<issue-status>) %<issue-title>" will help administrator to configure. Here is a problem. Should I use ERB for mail subjects or not? If I use ERB, it causes the same problem as mail bodies. If I use another simpler language, which language should I choose? Developing a new expression language like that?

I think Redmine users have a right to shoot their own feet. So I think ERB solves the problems. What do you think?

P.S.

Here is an simple expression language I developed. It can handle only:
  • String interpolation
  • conditional expression which depends on if the passed variable is empty or not.
[%<project-name> - %<tracker-name> #%<issue-id>] (%<issue-status>) %<issue-title>
[%<project-name> - %<tracker-name> #%<issue-id>] %<issue-status ? "(%<issue-status>) " : "">

it is easy to implement, easy to learn and we can solve a half of #6221 with it. But users must learn another language, anyway.

#5 Updated by Joël Lamotte over 6 years ago

I think Redmine users have a right to shoot their own feet. So I think ERB solves the problems. What do you think?

I agree.

#6 Updated by Sergey Startsev over 3 years ago

This would be a great feature. +1
Our customers want notification letters to be more inmormative and readable.

#7 Updated by Òscar Casajuana over 2 years ago

+1

#8 Updated by Toshi MARUYAMA over 2 years ago

  • Description updated (diff)

Also available in: Atom PDF