-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): Switch to MJML for email templates (#10518)
- Loading branch information
Showing
24 changed files
with
754 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/cli/src/user-management/email/templates/_common.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<mj-head> | ||
<mj-attributes> | ||
<mj-all font-family="Open Sans, sans-serif"></mj-all> | ||
<mj-body background-color="#fbfcfe"></mj-body> | ||
<mj-text | ||
font-weight="400" | ||
font-size="16px" | ||
color="#444444" | ||
line-height="24px" | ||
padding="10px 0 0 0" | ||
align="center" | ||
></mj-text> | ||
<mj-button | ||
background-color="#ff6f5c" | ||
color="#ffffff" | ||
font-size="18px" | ||
font-weight="600" | ||
align="center" | ||
padding-top="20px" | ||
line-height="24px" | ||
border-radius="4px" | ||
></mj-button> | ||
<mj-section padding="20px 0px"></mj-section> | ||
</mj-attributes> | ||
</mj-head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<mj-section> | ||
<mj-column> | ||
<mj-image src="cid:n8n-logo" height="40px" width="70px" /> | ||
</mj-column> | ||
</mj-section> |
18 changes: 18 additions & 0 deletions
18
packages/cli/src/user-management/email/templates/credentials-shared.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<mjml> | ||
<mj-include path="./_common.mjml" /> | ||
<mj-body> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="24px" color="#ff6f5c">A credential has been shared with you</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section background-color="#FFFFFF" border="1px solid #ddd"> | ||
<mj-column> | ||
<mj-text><b>"{{ credentialsName }}"</b> credential has been shared with you.</mj-text> | ||
<mj-text>To access it, please click the button below.</mj-text> | ||
<mj-button href="{{credentialsListUrl}}">Open credential</mj-button> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./_logo.mjml" /> | ||
</mj-body> | ||
</mjml> |
4 changes: 0 additions & 4 deletions
4
packages/cli/src/user-management/email/templates/credentialsShared.html
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/cli/src/user-management/email/templates/instanceSetup.html
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions
31
packages/cli/src/user-management/email/templates/password-reset-requested.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<mjml> | ||
<mj-include path="./_common.mjml" /> | ||
<mj-body> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="24px" color="#ff6f5c">Reset your n8n password</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section background-color="#FFFFFF" border="1px solid #ddd"> | ||
<mj-column> | ||
<mj-text font-size="20px">Hi {{firstName}},</mj-text> | ||
<mj-text>Somebody asked to reset your password on n8n at <b>{{domain}}</b> .</mj-text> | ||
<mj-text> Click the following link to choose a new password. </mj-text> | ||
<mj-button href="{{passwordResetUrl}}">Set a new password</mj-button> | ||
|
||
<mj-text font-size="14px"> | ||
The link is only valid for 20 minutes since this email was sent. | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="12px" color="#777"> | ||
If you did not request this email, you can safely ignore this. <br /> | ||
Your password will not be changed. | ||
</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./_logo.mjml" /> | ||
</mj-body> | ||
</mjml> |
5 changes: 0 additions & 5 deletions
5
packages/cli/src/user-management/email/templates/passwordReset.html
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
packages/cli/src/user-management/email/templates/user-invited.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<mjml> | ||
<mj-include path="./_common.mjml" /> | ||
<mj-body> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="24px" color="#ff6f5c">Welcome to n8n! 🎉</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section background-color="#FFFFFF" border="1px solid #ddd"> | ||
<mj-column> | ||
<mj-text>You have been invited to join n8n at <b>{{domain}}</b> .</mj-text> | ||
<mj-text>To accept, please click the button below.</mj-text> | ||
<mj-button href="{{inviteAcceptUrl}}">Set up your n8n account</mj-button> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./_logo.mjml" /> | ||
</mj-body> | ||
</mjml> |
18 changes: 18 additions & 0 deletions
18
packages/cli/src/user-management/email/templates/workflow-shared.mjml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<mjml> | ||
<mj-include path="./_common.mjml" /> | ||
<mj-body> | ||
<mj-section> | ||
<mj-column> | ||
<mj-text font-size="24px" color="#ff6f5c">A workflow has been shared with you</mj-text> | ||
</mj-column> | ||
</mj-section> | ||
<mj-section background-color="#FFFFFF" border="1px solid #ddd"> | ||
<mj-column> | ||
<mj-text><b>"{{ workflowName }}"</b> workflow has been shared with you.</mj-text> | ||
<mj-text>To access it, please click the button below.</mj-text> | ||
<mj-button href="{{workflowUrl}}">Open Workflow</mj-button> | ||
</mj-column> | ||
</mj-section> | ||
<mj-include path="./_logo.mjml" /> | ||
</mj-body> | ||
</mjml> |
Oops, something went wrong.