Skip to content

Commit 6d768fc

Browse files
Merge pull request #287 from supertokens/email-template-superhuman
feat: email templates updated
2 parents 60df632 + d069dd4 commit 6d768fc

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixes
1313

14+
- Update email templates to fix an issue with styling on some email clients
1415
- Fixes an issue where session verification would fail when using JWTs created by the JWT recipe (and not the session recipe)
1516

1617
## [0.12.6] - 2023-06-01

recipe/emailverification/emaildelivery/smtpService/emailVerify.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const emailVerificationTemplate = `<!doctype html>
3434
<title>*|MC:SUBJECT|*</title>
3535
3636
<style type="text/css">
37+
body {
38+
max-width: 100vw;
39+
overflow: hidden;
40+
}
3741
p {
3842
margin: 10px 0;
3943
padding: 0;
@@ -782,6 +786,11 @@ const emailVerificationTemplate = `<!doctype html>
782786
}
783787
784788
}
789+
@media only screen and (max-width: 480px) {
790+
#meant-for {
791+
padding: 20px;
792+
}
793+
}
785794
</style>
786795
</head>
787796
@@ -901,6 +910,7 @@ const emailVerificationTemplate = `<!doctype html>
901910
902911
903912
<p
913+
id="meant-for"
904914
style="font-family: 'Helvetica', sans-serif; font-size: 16px; line-height: 26px; font-weight:400; text-align: center; color: #808080">
905915
This email is meant for <a
906916
style="font-family: 'Helvetica', sans-serif; text-align: center; word-break: break-all; font-weight: 400; font-size: 16px; line-height: 26px; color: #808080 !important;"

recipe/passwordless/emaildelivery/smtpService/passwordlessLogin.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const magicLinkAndOtpLoginTemplate = `<!doctype html>
3434
<title>*|MC:SUBJECT|*</title>
3535
3636
<style type="text/css">
37+
body {
38+
max-width: 100vw;
39+
overflow: hidden;
40+
}
3741
p {
3842
margin: 10px 0;
3943
padding: 0;
@@ -1013,6 +1017,10 @@ const magicLinkLoginTemplate = `<!doctype html>
10131017
<title>*|MC:SUBJECT|*</title>
10141018
10151019
<style type="text/css">
1020+
body {
1021+
max-width: 100vw;
1022+
overflow: hidden;
1023+
}
10161024
p {
10171025
margin: 10px 0;
10181026
padding: 0;
@@ -1931,6 +1939,10 @@ const otpLoginTemplate = `<!doctype html>
19311939
<title>*|MC:SUBJECT|*</title>
19321940
19331941
<style type="text/css">
1942+
body {
1943+
max-width: 100vw;
1944+
overflow: hidden;
1945+
}
19341946
p {
19351947
margin: 10px 0;
19361948
padding: 0;

0 commit comments

Comments
 (0)