Skip to content

Commit 69521b7

Browse files
authored
Merge pull request #141 from jacob-ai-bot/kl-update-email-template
updated email template
2 parents f349cd4 + 0daa6c0 commit 69521b7

File tree

1 file changed

+129
-78
lines changed

1 file changed

+129
-78
lines changed

src/server/utils/email.ts

Lines changed: 129 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -28,89 +28,140 @@ export async function sendTransactionalEmail(
2828
Html: {
2929
Charset: "UTF-8",
3030
Data: `
31-
<!DOCTYPE html>
32-
<html lang="en">
33-
<head>
34-
<meta charset="UTF-8">
35-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
36-
<title>New Todo Item Created</title>
37-
<style>
38-
body {
39-
font-family: 'Inter', sans-serif;
40-
line-height: 1.6;
41-
color: #374151;
42-
background-color: #F0F7FF;
43-
margin: 0;
44-
padding: 0;
45-
}
46-
.container {
47-
max-width: 600px;
48-
margin: 0 auto;
49-
padding: 40px 20px;
50-
}
51-
.card {
52-
background-color: #FFFFFF;
53-
border-radius: 8px;
54-
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
55-
padding: 32px;
56-
margin-bottom: 24px;
57-
}
58-
h1 {
59-
color: #003A66;
60-
font-size: 24px;
61-
margin-bottom: 16px;
62-
}
63-
h2 {
64-
color: #007FB3;
65-
font-size: 20px;
66-
margin-bottom: 12px;
67-
}
68-
p {
69-
margin-bottom: 16px;
70-
}
71-
.btn {
72-
display: inline-block;
73-
background-color: #00C8FF;
74-
color: #FFFFFF;
75-
text-decoration: none;
76-
padding: 12px 24px;
77-
border-radius: 4px;
78-
font-weight: 600;
79-
transition: background-color 0.3s ease;
80-
}
81-
.btn:hover {
82-
background-color: #00A3D9;
83-
}
84-
.footer {
85-
text-align: center;
86-
margin-top: 32px;
87-
color: #6B7280;
88-
font-size: 14px;
89-
}
90-
</style>
91-
</head>
92-
<body>
93-
<div class="container">
94-
<div class="card">
95-
<h1>New Todo Item Created</h1>
96-
<p>Hi there,</p>
97-
<p>A new todo item has been created based on your GitHub issue:</p>
98-
<h2>${todoItem.name}</h2>
99-
<p>${todoItem.description}</p>
100-
<a href="${actionLink}" class="btn">View Todo Item</a>
101-
</div>
102-
<div class="footer">
103-
<p>Best regards,<br/>The Jacob AI Team</p>
104-
</div>
105-
</div>
106-
</body>
107-
</html>
31+
<!DOCTYPE html>
32+
<html lang="en">
33+
<head>
34+
<meta charset="UTF-8">
35+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
36+
<title>New ${githubRepo} todo - ${todoItem.name}</title>
37+
<style>
38+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
39+
40+
body {
41+
font-family: 'Inter', sans-serif;
42+
line-height: 1.6;
43+
color: #1F2937;
44+
background-color: #F9FAFB;
45+
margin: 0;
46+
padding: 0;
47+
}
48+
.container {
49+
max-width: 600px;
50+
margin: 0 auto;
51+
padding: 40px 20px;
52+
}
53+
.card {
54+
background-color: #FFFFFF;
55+
border-radius: 16px;
56+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
57+
padding: 40px;
58+
margin-bottom: 32px;
59+
}
60+
.logo {
61+
text-align: center;
62+
margin-bottom: 32px;
63+
}
64+
.logo img {
65+
width: 120px;
66+
height: auto;
67+
}
68+
h1 {
69+
color: #003A66;
70+
font-size: 28px;
71+
font-weight: 700;
72+
margin-bottom: 24px;
73+
text-align: center;
74+
}
75+
h2 {
76+
color: #007FB3;
77+
font-size: 22px;
78+
font-weight: 600;
79+
margin-bottom: 16px;
80+
}
81+
p {
82+
margin-bottom: 24px;
83+
font-size: 16px;
84+
}
85+
.btn {
86+
display: block;
87+
background-color: #00C8FF;
88+
color: #FFFFFF;
89+
text-decoration: none;
90+
padding: 16px 28px;
91+
border-radius: 8px;
92+
font-weight: 600;
93+
font-size: 16px;
94+
transition: all 0.3s ease;
95+
text-align: center;
96+
max-width: 200px;
97+
margin: 32px auto;
98+
}
99+
.btn:hover {
100+
background-color: #00A3D9;
101+
transform: translateY(-2px);
102+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
103+
}
104+
.todo-card {
105+
background-color: #F3F4F6;
106+
border-radius: 8px;
107+
padding: 24px;
108+
margin-bottom: 32px;
109+
}
110+
.todo-link {
111+
display: inline-block;
112+
color: #007FB3;
113+
text-decoration: none;
114+
font-weight: 600;
115+
margin-top: 12px;
116+
transition: color 0.3s ease;
117+
}
118+
.todo-link:hover {
119+
color: #00C8FF;
120+
}
121+
.footer {
122+
text-align: center;
123+
color: #6B7280;
124+
font-size: 14px;
125+
}
126+
.divider {
127+
height: 1px;
128+
background-color: #E5E7EB;
129+
margin: 32px 0;
130+
}
131+
</style>
132+
</head>
133+
<body>
134+
<div class="container">
135+
<div class="card">
136+
<div class="logo">
137+
<img src="https://jacb.ai/images/logo.svg" alt="JACoB AI Logo">
138+
</div>
139+
<h1>Your New Todo is Ready</h1>
140+
<p>Hey there,</p>
141+
<p>JACoB's been busy. We've taken your GitHub issue and turned it into a smart, actionable todo. Here's what's cooking:</p>
142+
<div class="todo-card">
143+
<h2>${todoItem.name}</h2>
144+
<a href="${actionLink}" class="todo-link">View Todo</a>
145+
</div>
146+
<p>JACoB didn't just copy-paste your issue. It dug deep, analyzing how this fits into your codebase and crafting a step-by-step game plan. Pretty neat, huh?</p>
147+
<p>What's next? Hop in, review the todo and the plan, tweak if needed, and set things in motion. You can assign it to JACoB for some AI magic or loop in one of your team's developers.</p>
148+
<a href="${actionLink}" class="btn">Check it out</a>
149+
<div class="divider"></div>
150+
<p>Got questions? Ideas? We're all ears. Drop us a line anytime.</p>
151+
<p>Keep shipping awesome stuff!</p>
152+
<div class="footer">
153+
<p>Cheers,<br>The JACoB AI Team</p>
154+
</div>
155+
</div>
156+
</div>
157+
</body>
158+
</html>
108159
`,
109160
},
110161
},
111162
Subject: {
112163
Charset: "UTF-8",
113-
Data: "Your New Todo Item has been Created",
164+
Data: `New ${githubRepo} todo - ${todoItem.name}`,
114165
},
115166
},
116167
Source: process.env.SES_EMAIL_SOURCE ?? "",

0 commit comments

Comments
 (0)