Feature #1087
closed
Configurable sender of email templates
Added by Alena Peterová over 6 years ago.
Updated over 6 years ago.
Description
Please add an option to configure the sender of a notification per template. Our use case:
- Emails from the template companyOneRegistration will be sent with the sender idm@companyOne.tld
- Emails from the template companyTwoRegistration will be sent with the sender idm@companyTwo.tld
- Status changed from New to In Progress
- % Done changed from 0 to 90
Implemented in branch rkucera/1087-email-template-sender
Now is possible to have attribute sender in .xml template. If some template has this attribute then is set in DefaultEmailer, otherwise it will use the address from configuration as before.
Added field on email template detail so there is a possibility to edit this attribute via GUI.
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Ondřej Kopr
- Assignee changed from Ondřej Kopr to Radek Tomiška
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Roman Kučera
I did test and review, it works and code looks awesome! Thx.
Idea for redesign:
Sender (string) is used for email sender only. Maybe sender as identity(with email, phone, username, fullname ...) can be configured instead and can be used in future for other sender?
Pros:
- Sender in email can be filled simply by identityService.getNiceLabel(sender)
- can be used in other sender implementations
- the same convention as recipient
Cons:
- identity has to exist => identity for "service" senders has to be created
- referential integrity has to be added, when identity is deleted
I don§t know original requirement ... so if my idea is wrong, you can merge this feature into develop, add pls new attribute to erd diagram, and then this ticket can be closed .)
In the original project, we will use only "service" senders for IdM (idm@company.cz). So we would have to create special identities.
I see one more drawback of the idea:
- Say I have some administrator (helpdesk), who can only edit identities, but he can't edit configuration. In this case, he could edit these special identities. So he could effectively configure the sender of email templates.
Ok, i will merge it into develop.
Note: i hope nobody will use the same template for different sender types :)
- Status changed from In Progress to Closed
- Target version set to Jade (8.1.0)
- % Done changed from 90 to 100
I merge it into develop, sender configuration works.
Note: When google email is used in emailer configuration (our test configuration), then configured sender is shown as 'X-Google-Original-From: idm@companyOne.tld', but real sender is google email. I suppose 'companyOne' will have less restrictive emailer (internal) and real sender configuration will be overriden ...
Also available in: Atom
PDF