fix: add missing templates and config for new domain
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Email Changed</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f6f8;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
background-color: #f4f6f8;
|
||||
padding: 24px 12px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px 24px;
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.change-box {
|
||||
margin: 16px 0;
|
||||
padding: 14px;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
background: #f9fafb;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #4b5563;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #111827;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 18px 24px 24px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.wrapper {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
|
||||
.header,
|
||||
.content,
|
||||
.footer {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="card">
|
||||
<div class="header">Your email was changed</div>
|
||||
<div class="content">
|
||||
<p>Hello,</p>
|
||||
<p>We are confirming that the email address on your account was updated.</p>
|
||||
|
||||
<div class="change-box">
|
||||
<div><span class="label">Old email:</span> <span class="value">{{ EMAIL_FROM }}</span></div>
|
||||
<div><span class="label">New email:</span> <span class="value">{{ EMAIL_TO }}</span></div>
|
||||
</div>
|
||||
|
||||
<p>If you made this change, no further action is needed.</p>
|
||||
<p>If you did not make this change, please secure your account immediately and contact support at <a href="mailto:ricardompcampos@gmail.com">ricardompcampos@gmail.com</a>.</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
This is an automatic notification, please do not reply.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Password Changed</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f6f8;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
background-color: #f4f6f8;
|
||||
padding: 24px 12px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px 24px;
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.notice {
|
||||
margin: 16px 0;
|
||||
padding: 14px;
|
||||
border: 1px solid #d1d5db;
|
||||
border-radius: 8px;
|
||||
background: #f9fafb;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 18px 24px 24px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.wrapper {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
|
||||
.header,
|
||||
.content,
|
||||
.footer {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="card">
|
||||
<div class="header">Your password was changed</div>
|
||||
<div class="content">
|
||||
<p>Hello,</p>
|
||||
<p>This is a confirmation that your account password was successfully changed.</p>
|
||||
|
||||
<div class="notice">
|
||||
If you made this change, no further action is needed. If you did not make this change,
|
||||
secure your account immediately and contact support at <a href="mailto:ricardompcampos@gmail.com">ricardompcampos@gmail.com</a>.
|
||||
</div>
|
||||
|
||||
<p>Thank you.</p>
|
||||
</div>
|
||||
<div class="footer">This is an automatic message, please do not reply.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Reset Your Password</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f6f8;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
background-color: #f4f6f8;
|
||||
padding: 24px 12px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px 24px;
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.button-wrap {
|
||||
margin: 24px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 12px 20px;
|
||||
background: #b91c1c;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.fallback-link {
|
||||
margin-top: 8px;
|
||||
font-size: 13px;
|
||||
color: #4b5563;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 18px 24px 24px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.wrapper {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
|
||||
.header,
|
||||
.content,
|
||||
.footer {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="card">
|
||||
<div class="header">Reset your password</div>
|
||||
<div class="content">
|
||||
<p>Hello,</p>
|
||||
<p>We received a request to reset your password. Click the button below to continue.</p>
|
||||
|
||||
<div class="button-wrap">
|
||||
<a class="button" href="{{ RESET_LINK }}" target="_blank" rel="noopener noreferrer">Reset Password</a>
|
||||
<div class="fallback-link">If the button does not work, open this link: {{ RESET_LINK }}</div>
|
||||
</div>
|
||||
|
||||
<p>If you did not request this, you can ignore this email.</p>
|
||||
</div>
|
||||
<div class="footer">This is an automatic message, please do not reply.</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,114 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Confirm Your Account</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f4f6f8;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #1f2937;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
background-color: #f4f6f8;
|
||||
padding: 24px 12px;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 20px 24px;
|
||||
background: #111827;
|
||||
color: #ffffff;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 24px;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.button-wrap {
|
||||
margin: 24px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 12px 20px;
|
||||
background: #0f766e;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.fallback-link {
|
||||
margin-top: 8px;
|
||||
font-size: 13px;
|
||||
color: #4b5563;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.footer {
|
||||
padding: 18px 24px 24px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.wrapper {
|
||||
padding: 16px 8px;
|
||||
}
|
||||
|
||||
.header,
|
||||
.content,
|
||||
.footer {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="card">
|
||||
<div class="header">Confirm your account</div>
|
||||
<div class="content">
|
||||
<p>Hello,</p>
|
||||
<p>Thank you for signing up. Please confirm your account by clicking the button below.</p>
|
||||
|
||||
<div class="button-wrap">
|
||||
<a class="button" href="{{ CONFIRMATION_LINK }}" target="_blank" rel="noopener noreferrer">
|
||||
Confirm Account
|
||||
</a>
|
||||
<div class="fallback-link">If the button does not work, open this link: {{ CONFIRMATION_LINK }}</div>
|
||||
</div>
|
||||
|
||||
<p>If you did not create this account, you can ignore this email.</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
This is an automatic message, please do not reply.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+1
-1
@@ -7,7 +7,7 @@ import java.util.Optional;
|
||||
/** This class represents a template for the email change workflow. */
|
||||
public class MailgunTemplateEmailChanged implements MailgunTemplate {
|
||||
|
||||
private String templateName = "email changed";
|
||||
private String templateName = "email_changed";
|
||||
private String carbonCopy;
|
||||
private final Map<String, Object> props;
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
/** This class represents a template for the password reset workflow. */
|
||||
public class MailgunTemplateResetPwd implements MailgunTemplate {
|
||||
|
||||
private String templateName = "password reset";
|
||||
private String templateName = "password_reset";
|
||||
private final Map<String, Object> props;
|
||||
|
||||
public MailgunTemplateResetPwd() {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
/** This class represents a template for the password reset confirmation workflow. */
|
||||
public class MailgunTemplateResetPwdConfirm implements MailgunTemplate {
|
||||
|
||||
private String templateName = "password change confirmation";
|
||||
private String templateName = "password_change_confirmation";
|
||||
private final Map<String, Object> props;
|
||||
|
||||
public MailgunTemplateResetPwdConfirm() {
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.Map;
|
||||
/** This class represents a template for the sign up workflow. */
|
||||
public class MailgunTemplateSignUp implements MailgunTemplate {
|
||||
|
||||
private String templateName = "sign up confirmation";
|
||||
private String templateName = "sign_up_confirmation";
|
||||
private final Map<String, Object> props;
|
||||
|
||||
public MailgunTemplateSignUp() {
|
||||
|
||||
@@ -13,8 +13,8 @@ logging:
|
||||
|
||||
mailgun:
|
||||
api-key: ${MAILGUN_APIKEY:abc123456}
|
||||
domain: tasknoteapp.dev.br
|
||||
sender-email: no-reply@tasknoteapp.dev.br
|
||||
domain: tasknote.darkroasted.vps-kinghost.net
|
||||
sender-email: no-reply@tasknote.darkroasted.vps-kinghost.net
|
||||
|
||||
server:
|
||||
port: 8585
|
||||
|
||||
@@ -45,7 +45,7 @@ class MailgunTemplateTest {
|
||||
MailgunTemplateEmailChanged emailChanged = new MailgunTemplateEmailChanged();
|
||||
|
||||
Assertions.assertNotNull(emailChanged.getName());
|
||||
Assertions.assertEquals("email changed", emailChanged.getName());
|
||||
Assertions.assertEquals("email_changed", emailChanged.getName());
|
||||
Assertions.assertNotNull(emailChanged.getVariables());
|
||||
Assertions.assertNotNull(emailChanged.getVariableValuesJson());
|
||||
Assertions.assertFalse(emailChanged.getVariableValuesJson().isBlank());
|
||||
|
||||
Reference in New Issue
Block a user