Skip to content

Commit a04cf72

Browse files
committed
feat: add email invitation template and kustomization files
Introduced a new email invitation template for user invitations, along with the necessary kustomization files for notification resources. This includes the HTML and text body formats for the email, ensuring a structured and styled invitation experience.
1 parent 6c7485e commit a04cf72

File tree

3 files changed

+90
-0
lines changed

3 files changed

+90
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- userinvitation-emailtemplate.yaml
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
apiVersion: notification.miloapis.com/v1alpha1
2+
kind: EmailTemplate
3+
metadata:
4+
name: emailtemplates.notification.miloapis.com-userinvitationemailtemplate
5+
spec:
6+
subject: "Join your friends on Datum"
7+
htmlBody: |
8+
<html>
9+
<head>
10+
<style>
11+
body {
12+
font-family: Arial, sans-serif;
13+
line-height: 1.6;
14+
color: #333333;
15+
}
16+
.container {
17+
max-width: 600px;
18+
margin: 0 auto;
19+
padding: 20px;
20+
}
21+
.header {
22+
text-align: center;
23+
margin-bottom: 30px;
24+
}
25+
.button {
26+
display: inline-block;
27+
padding: 12px 24px;
28+
background-color: #007bff;
29+
color: white;
30+
text-decoration: none;
31+
border-radius: 4px;
32+
margin: 20px 0;
33+
}
34+
.footer {
35+
margin-top: 30px;
36+
font-size: 12px;
37+
color: #666666;
38+
}
39+
</style>
40+
</head>
41+
<body>
42+
<div class="container">
43+
<div class="header">
44+
<h1>Join your friends on Datum</h1>
45+
</div>
46+
47+
<p>{{.InviterDisplayName}} has just invited you to use Datum with them,<br/>
48+
in an organization called <strong>{{.OrganizationDisplayName}}</strong>,<br/>
49+
with the role{{if (gt (len .Roles) 1)}}s{{end}} of <strong>{{.Roles}}</strong>.</p>
50+
51+
<p style="text-align: center;">
52+
<a href="https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept" class="button">Accept Invitation</a>
53+
</p>
54+
55+
<p>If the button doesn't work, copy and paste this link into your browser:</p>
56+
<p>https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept</p>
57+
58+
<div class="footer">
59+
<p>This is an automated message, please do not reply.</p>
60+
</div>
61+
</div>
62+
</body>
63+
</html>
64+
textBody: |
65+
{{.InviterDisplayName}} has just invited you to use Datum with them,
66+
in an organization called {{.OrganizationDisplayName}}, with the role{{if (gt (len .Roles) 1)}}s{{end}} of {{.Roles}}.
67+
68+
Here's the link for accepting the invitation:
69+
https://cloud.datun.net/invitations/name/{{.UserInvitationName}}/accept
70+
71+
(If the link doesn't open, copy and paste it into your browser.)
72+
73+
This is an automated message, please do not reply.
74+
variables:
75+
- name: "InviterDisplayName"
76+
required: true
77+
type: "string"
78+
- name: "OrganizationDisplayName"
79+
required: true
80+
type: "string"
81+
- name: "Roles"
82+
required: true
83+
type: "string"
84+
- name: "UserInvitationName"
85+
required: true
86+
type: "string"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- email

0 commit comments

Comments
 (0)