Skip to content

Commit 2280c88

Browse files
Refacor email content and delivery (#132)
1 parent d1193cb commit 2280c88

File tree

4 files changed

+60
-41
lines changed

4 files changed

+60
-41
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ server/dist
2222
server/data
2323
/.idea
2424
server/test*.[tj]s
25+
server/playground.ts

server/src/constants/common.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export const EMAIL_ADDRESSES = {
2-
SUPPORT: "support@animechan.io",
2+
PERSONAL: "rocktim@animechan.io",
3+
SUPPORT: '"Animechan" <support@animechan.io>',
34
};

server/src/constants/email.ts

Lines changed: 56 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,72 +5,89 @@ export const WELCOME_ACTIVATE_EMAIL = (apiKey: string) => `
55
<!DOCTYPE html>
66
<html lang="en">
77
<head>
8-
<meta charset="UTF-8">
9-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta charset="UTF-8" />
9+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
1010
<title>Thank You for Supporting Animechan!</title>
1111
<style>
1212
body {
13-
font-family: Arial, sans-serif;
14-
line-height: 1.6;
15-
color: #333;
16-
max-width: 600px;
17-
margin: 0 auto;
18-
padding: 20px;
13+
font-family: Arial, sans-serif;
14+
line-height: 1.4;
15+
color: #333;
16+
max-width: 600px;
17+
margin: 0 auto;
1918
}
2019
2120
.container {
22-
text-align: center;
21+
text-align: center;
2322
}
2423
2524
.logo {
26-
width: 150px;
27-
height: auto;
28-
display: block;
29-
max-width: 150px;
30-
margin: 0 auto 20px;
25+
width: 150px;
26+
height: auto;
27+
display: block;
28+
max-width: 150px;
29+
margin: 0 auto 20px;
3130
}
3231
3332
h2 {
34-
color: #4a4a4a;
35-
font-weight: 600;
33+
color: #4a4a4a;
34+
font-weight: 600;
3635
}
3736
3837
p {
39-
font-size: 15px !important;
38+
font-size: 15px !important;
4039
}
4140
4241
.api-key {
43-
background-color: #f4f4f4;
44-
padding: 10px;
45-
border-radius: 5px;
46-
font-family: monospace;
47-
font-size: 14px;
48-
word-break: break-all;
42+
display: inline-block;
43+
background-color: #f4f4f4;
44+
padding: 10px;
45+
border-radius: 5px;
46+
font-family: monospace;
47+
font-size: 14px;
48+
word-break: break-all;
4949
}
5050
5151
.cta-button {
52-
display: inline-block;
53-
background-color: #007bff;
54-
color: white !important;
55-
text-decoration: none;
56-
padding: 10px 20px;
57-
border-radius: 5px;
58-
margin-top: 5px;
52+
display: inline-block;
53+
background-color: #007bff;
54+
color: white !important;
55+
text-decoration: none;
56+
padding: 10px 20px;
57+
border-radius: 5px;
58+
margin-top: 5px;
5959
}
6060
</style>
6161
</head>
62+
6263
<body>
6364
<div class="container">
64-
<img src="https://res.cloudinary.com/animechan/image/upload/v1717068016/assets/5b071025d48339b3baa26dccb0a79e55.png" alt="Animechan Logo" class="logo">
65-
<h1>Thank You for Supporting Animechan!</h1>
66-
<p>We're incredibly grateful for your sponsorship of the Animechan API project. <br />Your contribution is invaluable and helps us continue to improve our service. </p>
67-
<h2>Your API Key</h2>
65+
<img
66+
src="https://res.cloudinary.com/animechan/image/upload/v1717068016/assets/5b071025d48339b3baa26dccb0a79e55.png"
67+
alt="Animechan Logo"
68+
class="logo"
69+
/>
70+
71+
<h1>Welcome to Animechan Premium 🎉</h1>
72+
<p>
73+
Thank you for joining as a premium member of the Animechan API
74+
project.<br />Your support helps keep Animechan alive and
75+
delivering a great experience for all.
76+
</p>
77+
78+
<h2>Your Exclusive API Key:</h2>
6879
<p class="api-key">${apiKey}</p>
69-
<p>You now also have access to our private Discord server for premium members.</p>
70-
<a href="${process.env.PRIVATE_DISCORD_URL}" class="cta-button">Join Our Discord</a>
71-
<h2>Getting Started</h2>
72-
<p>Ready to dive in? Check out our <a href="https://animechan.io/docs/" target="_blank">API documentation</a> to make authenticated requests. <br /> If you have any questions or need assistance, don't hesitate to reach out to us at <a href="mailto:support@animechan.io">support@animechan.io</a> or our private discord server. </p>
73-
<p>Thank you again for your support!</p>
80+
81+
<p>
82+
Check out our <a href="https://animechan.io/docs/" target="_blank">documentation</a>
83+
on how to make authenticated requests.<br />
84+
For any questions or assistance, please reach out to us at
85+
<a href="mailto:support@animechan.io">support@animechan.io</a> or our
86+
discord server. <br/><br/>
87+
Thank you once again for your support.<br/>
88+
Animechan Team.
89+
<a href="https://animechan.io" target="_blank">www.animechan.io</a>
90+
</p>
7491
</div>
7592
</body>
7693
</html>

server/src/routes/bmac.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ router.post("/bmac", async (req, res) => {
8484
if (isProduction) {
8585
await sendEmail({
8686
to: supporterEmail,
87-
subject: "Thank you for your support | Animechan.io",
87+
subject: "Welcome to Animechan Premium | Animechan.io",
8888
content: WELCOME_ACTIVATE_EMAIL(apiKey.key),
8989
});
9090
console.log("Created user and API key:", user, apiKey);

0 commit comments

Comments
 (0)