fix: remove HTML document wrapper from email templates for GMX compat
GMX webmail broke after adding <!DOCTYPE html><html><head><body>
wrappers — the Logto SMTP connector sets these as nodemailer's html
field, and GMX's sanitizer chokes on a full document inside its own
page shell. Reverts to bare HTML fragments (the format that worked
before 12:17 commit 484a388) while keeping the extra text paragraphs
added for mail checker text-to-HTML ratio compliance.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Reset your Cameleer password</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;background:#f5f1eb;">
|
|
||||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
|
||||||
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
||||||
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +20,4 @@
|
|||||||
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
||||||
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Your Cameleer verification code</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;background:#f5f1eb;">
|
|
||||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
|
||||||
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
||||||
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +20,4 @@
|
|||||||
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
||||||
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Your password was reset</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;background:#f5f1eb;">
|
|
||||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
|
||||||
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
||||||
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,6 +18,4 @@
|
|||||||
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
||||||
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Your caravan pass is almost ready</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;background:#f5f1eb;">
|
|
||||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
|
||||||
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
||||||
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +20,4 @@
|
|||||||
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
||||||
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<title>Your Cameleer sign-in code</title>
|
|
||||||
</head>
|
|
||||||
<body style="margin:0;padding:0;background:#f5f1eb;">
|
|
||||||
<div style="font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;max-width:480px;margin:0 auto;background:#ffffff;border-radius:8px;overflow:hidden;border:1px solid #e8e0d4;">
|
|
||||||
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
<div style="background:#C6820E;padding:20px 24px;text-align:center;">
|
||||||
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
<span style="font-size:22px;font-weight:700;color:#ffffff;letter-spacing:0.5px;">Cameleer.io</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +20,4 @@
|
|||||||
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
<p style="color:#999;font-size:12px;margin:0;">Questions? Contact your administrator</p>
|
||||||
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
<p style="color:#bbb;font-size:11px;margin:6px 0 0;">Cameleer — Apache Camel observability</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
@@ -34,17 +34,6 @@ class EmailTemplateLoadingTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void templatesContainHtmlStructure() throws IOException {
|
|
||||||
for (String path : TEMPLATE_FILES) {
|
|
||||||
String content = new ClassPathResource(path).getContentAsString(StandardCharsets.UTF_8);
|
|
||||||
assertTrue(content.contains("<!DOCTYPE html>"),
|
|
||||||
path + " must contain DOCTYPE declaration");
|
|
||||||
assertTrue(content.contains("<html"),
|
|
||||||
path + " must contain <html> tag");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void templatesContainWatermarkPlaceholder() throws IOException {
|
void templatesContainWatermarkPlaceholder() throws IOException {
|
||||||
for (String path : TEMPLATE_FILES) {
|
for (String path : TEMPLATE_FILES) {
|
||||||
|
|||||||
Reference in New Issue
Block a user