Add In-Reply-To header to mail notifications

Hi !

I like mail notifications on kanboard and in order to be able to use threading in my client mail, it will be nice to add “In-Reply-To” header to mail notifications.
Values defined in this header could be in this form : <Kanboard-BASE_URL-ID_TASK> so threading should be good even with multiple kanboard instance.

What do you think about this feature ?

Sylvain

FYI, if you are interested, you can do it with Postfix even if it’s ugly :

main.cf :
header_checks = pcre:/etc/postfix/header_checks.pcre

header_checs.pcre (to be completed according to the different topics generated by the kanban) :
/^Subject: .=?utf-8?Q?([0-9]+)?=$/ PREPEND In-Reply-To: kanban-udl-$1
/^Subject: .
=C2=B0([0-9]+)/ PREPEND In-Reply-To: kanban-udl-$1

Sylvain

You could try this PR: https://github.com/kanboard/kanboard/pull/4183

But it doesn’t seems to work with all email clients. Probably, because it need to be combined with other headers like Message-ID and References.

Which email client are you using?

Wouah, nice ! :slight_smile:

And yes, In-Reply-To works well with Thunderbird but not with Zimbra web client for example.
I have tested only with References header surrounding by <>, it’s works with the two clients + Gmail.

So, I think PR should be modified to this :

app/Notification/MailNotification.php
$headers['References'] = '<' . hash('sha256', 'KB'.$this->configModel->get('application_url').$event_data['task']['id']) . '>';