-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HAI-1526 Add functions to send hanke and application invitation emails #399
Conversation
e33521b
to
eac3ea3
Compare
a115b5f
to
7f15911
Compare
015c32a
to
952c6e5
Compare
Add templates for hanke and application invitation emails. Add functionality to send these invitations in EmailSenderService. Note: It is possible for inviter name to be unknown. In these cases the emails use only the inviter email ([email protected] kutsui sinut..). Using the new email sending features will be implemented on a different upcoming pr.
952c6e5
to
aa0917b
Compare
@@ -0,0 +1,5 @@ | |||
<mj-attributes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mjml files could be moved elsewhere. Under resources, they will be a part of the runtime package, which they clearly don't need to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any suggestions on where they should be located?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about an emailtemplate directory under scripts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not scripts, so that doesn't feel correct. Emails directory in either project root or services/hanke-service/emails
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placed them in project root email/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Dividing the common parts to a separate directory was a good addition.
services/hanke-service/src/main/resources/email/template/johtoselvitys-valmis.html.mustache
Outdated
Show resolved
Hide resolved
services/hanke-service/src/main/kotlin/fi/hel/haitaton/hanke/email/EmailSenderService.kt
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
Description
Add templates for hanke and application invitation emails. Add functionality to send these invitations in EmailSenderService.
Note: It is possible for inviter name to be unknown. In these cases the emails use only the inviter email ([email protected] kutsui sinut..).
Note: mjml.io plugin is used to create the email templates. From mjml documentation:
MJML is a markup language designed to reduce the pain of coding a responsive email. Its semantic syntax makes it easy and straightforward and its rich standard components library speeds up your development time and lightens your email codebase. MJML’s open-source engine generates high quality responsive HTML compliant with best practices.
Note: Email translations are not included in this pr, as mentioned in the Jira ticket.
Using the new email sending features will be implemented on a different upcoming pr.
Jira Issue: https://helsinkisolutionoffice.atlassian.net/browse/HAI-1526
Type of change
Instructions for testing
This cannot be directly tested, but adding something like this to EmailSenderService can be used for verification:
Then you can check localhost:3003 (email server in docker compose)
Checklist:
or other location:
Other relevant info
Please describe here if there is e.g. some requirements for this change or
other info that the tester/user needs to know.