Content
View differences
Updated by Michael Frister over 12 years ago
Reproduce:
- Go to my account
- Uncheck ‘I don’t want to be notified of changes that I make myself’ so you get mails for your own changes
- Go to a project’s work package index
- Create a work package
- Look for an email
- Switch to another user
- Update a work package
- Look for another email
- Open both mail’s source
- Compare the Message-ID headers
Expected: The message IDs should be different
Result: Both IDs are the same
Having two messages with the same message ID results in Apple mail showing only one of the mails. I noticed this when Mail showed one of the mails in the preview and another mail in the detail view:

Apparently, [we use the work package’s id and created\_at fields](https://github.com/opf/openproject/blob/5dfd4624521d493cd7f18b39bcfd6cefccd423be/app/mailers/user_mailer.rb#L276) as unique part of the message id. Creation time of a work package obvisously doesn’t change between updates.
We might have to think about something even more unique than just using the update time instead of the create time. Before doing this, we should find out what semantic the Message-ID header has, it might have to be unique for every mail we send. In that case, the ID would have to be different for each user we inform about a work package update.
- Go to my account
- Uncheck ‘I don’t want to be notified of changes that I make myself’ so you get mails for your own changes
- Go to a project’s work package index
- Create a work package
- Look for an email
- Switch to another user
- Update a work package
- Look for another email
- Open both mail’s source
- Compare the Message-ID headers
Expected: The message IDs should be different
Result: Both IDs are the same
Having two messages with the same message ID results in Apple mail showing only one of the mails. I noticed this when Mail showed one of the mails in the preview and another mail in the detail view:

Apparently, [we use the work package’s id and created\_at fields](https://github.com/opf/openproject/blob/5dfd4624521d493cd7f18b39bcfd6cefccd423be/app/mailers/user_mailer.rb#L276) as unique part of the message id. Creation time of a work package obvisously doesn’t change between updates.
We might have to think about something even more unique than just using the update time instead of the create time. Before doing this, we should find out what semantic the Message-ID header has, it might have to be unique for every mail we send. In that case, the ID would have to be different for each user we inform about a work package update.