Feature #12864
closedIf ticket was created with priority High/Urgent, send smtp-email with priority Urgent
0%
Description
I am using Redmine 1.4 and I have a feature request (I did not found anything, regarding this):
- If a new ticket (created via web-UI) has the priority High/Urgent, also send the notification email with High priority via SMTP.
SMTP allows a priority-mark, so this would be a nice optional setting.
Exists some ideas about that?
Sincerely,
Related issues
Updated by Andrew Porter almost 12 years ago
This should be fairly simple aside from knowing which priority you should add the header for.
It might be a case of adding a custom priority field (SMTP Header) with a specific value (X-MSMail-Priority) but either way - adding the SMTP header is trivial
Just look in app/models/mailer.rb - the redmine_headers method already creates custom SMTP headers - you just need to add to headers[]
Updated by Toshi MARUYAMA almost 12 years ago
- Category set to Email notifications
Updated by Robin Kluth almost 12 years ago
Thanks for your hint.
The custom-header function is nice, but I dont want to make code changes. I thought, this request could be integrated as main-feature to Redmine as another setting.
Furthermore I have to make an if-case to check whether the ticket of the notification owns a high priority ot not (I dont have any ruby skills ;) ).
I thought this simply feature could be useful for all users.
Updated by Andrew Porter almost 12 years ago
Well, I was intrigued by this and added a priority custom field called SMTP:X-MSMail-Priority and set it appropriately per priority.
I then added the following to mailer.rb (inside issue_add (line 478 to be precise) -
# Add Custom SMTP headers per priority IssuePriorityCustomField.all.each do |cf| headers[cf.name[5..-1]] = issue.priority.custom_field_value(cf.id) if cf.name[0..4]=='SMTP:' && issue.priority.custom_field_value(cf.id)!=nil end
and I now see the following in my received email headers -
Importance: high X-Priority: 1
Thunderbird nicely shows it in the Priority column too
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
AFAIK, there's no standard header "priority"...
Management summary¶
There's no standard email header for priority.
Details¶
If you google you quickly get to RFC 4021, which has information about the priority header and says it originated in RFC 2156 (Mime Internet X.400 Enhanced Relay), which in turn says (on page 95):
priority: Mapped to the extended RFC 822 field "Priority:".
In reality, RFC 2156 was just an updtae to RFC 1327, which states the same as cited above. OK, so let's look at RFC 822... Interestingly, my browser can't find either the string 'prio' or the string 'extend'. OK, so there's no priority in 822...
Let's go on and check the RFCs that updated 822: RFC 1123... No 'priority' in there. RFC 1138... At last, page 38 has something:
The following non-standard services (headers) may be present
[...]
Priority
... and on page 67 there's some more info:
This section describes the MTS mappings [...] The following extensions to RFC 822 are defined to support this mapping:
"Priority" ":" priority
[...]
priority = "normal" / "non-urgent" / "urgent"
So until now, no standard header priority is defined. Let's check the RFCs that obsoleted the good old 822, RFC 2822 - you're already expecting it: Neither 'priority' nor 'urgent' can be found in 2822.
But wasn't 2822 obsoleted by 5322? Yes, it was, but neither 'priority' nor 'urgent' in there, too.
Despite all this, there are some common headers that indicate some kind of 'priority':- X-Priority
- X-MSMail-Priority
- Importance
Updated by Andrew Porter almost 12 years ago
That's why I chose to test this on my system using configurable SMTP header additions - the issue priority custom field name determines the header added (it's strips the STMP: prefix)
I've gonna leave my change in at my site - it's doing no harm and some of my users might find it useful.
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
Andrew Porter wrote:
That's why I chose to test this on my system using configurable SMTP header additions - the issue priority custom field name determines the header added (it's strips the STMP: prefix)
I'm not a native English speaker but I have the gut feeling that I may have been harsh in my comment or that you might have taken it a bit insulting - sorry, if that's the case, that wasn't my intention.
Such a setting might be useful for users if the redmine admin knows which header to use for the company's email system.
I've gonna leave my change in at my site - it's doing no harm and some of my users might find it useful.
I don't find it unuseful... If only the header was standardized and properly handled by all MTA / MUAs...
Updated by Andrew Porter almost 12 years ago
Nah - no offence and I read your comment in the tone you intended - I agree with you about the lack of standardisation of it - but that's the nature of the RFC process and open protocols I guess. I was suprised it actually worked to be honest :)
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
:-)
FTR: I checked our Lotus Notes (8.5.1, don't know about the Domino versions):
When marking an eMail as "High priority", it gets the header "Importance: 1".
Updated by Etienne Massip almost 12 years ago
Jan Niggemann wrote:
:-)
FTR: I checked our Lotus Notes (8.5.1, don't know about the Domino versions):
When marking an eMail as "High priority", it gets the header "Importance: 1".
RFC and Exchange (from test) use "low", "normal" and "high" literal values.
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
Etienne Massip wrote:
RFC and Exchange (from test) use "low", "normal" and "high" literal values.
RFC? Which one? Not that it matters much, I'm just interested...
Updated by Go MAEDA about 6 years ago
- Related to Feature #2746: Send out issue priority in the email notification header added
Updated by Go MAEDA 10 months ago
- Status changed from New to Closed
- Resolution set to Wont fix
Emails from Redmine 5.1.0 and later have X-Redmine-Issue-Priority
header field.
See #2746#note-16 for details.