style(mail): improve email contrast matching website dark aesthetic and remove postal address

This commit is contained in:
Philipp Urbschat 2026-09-12 23:49:03 +02:00
parent 3c78add335
commit 98cf8e6fda
Signed by: Phili
SSH key fingerprint: SHA256:ZSQWnldzrYiABzOV6vTICPe0h19pTpus7sCbm2S0po0

View file

@ -31,47 +31,67 @@ class MailService {
$subject = 'Persönliche Einladung zu philippurbschat.de'; $subject = 'Persönliche Einladung zu philippurbschat.de';
$bodyHtml = ' $bodyHtml = '<!DOCTYPE html>
<div style="background-color: #020617; color: #e2e8f0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: 40px 20px; text-align: center;"> <html>
<div style="max-width: 540px; margin: 0 auto; background-color: #0b1120; border: 1px solid #1e293b; border-radius: 20px; padding: 35px 30px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,0.5);"> <head>
<div style="font-size: 20px; font-weight: bold; color: #f8fafc; margin-bottom: 25px; letter-spacing: -0.5px;"> <meta charset="UTF-8">
<span style="color: #10b981;">_</span>PhilippUrbschat <meta name="viewport" content="width=device-width, initial-scale=1.0">
</div> <meta name="color-scheme" content="dark">
<meta name="supported-color-schemes" content="dark">
<p style="font-size: 14px; line-height: 1.6; color: #cbd5e1; margin-bottom: 18px;"> </head>
Hallo, <body style="margin: 0; padding: 0; background-color: #020617; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Helvetica, Arial, sans-serif;">
</p> <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#020617" style="background-color: #020617; width: 100%; padding: 40px 15px;">
<tr>
<p style="font-size: 14px; line-height: 1.6; color: #cbd5e1; margin-bottom: 18px;"> <td align="center">
du wurdest eingeladen, dir einen persönlichen Zugang auf <strong>philippurbschat.de</strong> anzulegen. <table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 540px; background-color: #0b1120; border: 1px solid #1e293b; border-radius: 24px; padding: 36px 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.6);" bgcolor="#0b1120">
</p> <tr>
<td style="padding-bottom: 24px;">
<span style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 20px; font-weight: 800; color: #ffffff; letter-spacing: -0.5px;">
<span style="color: #10b981;">_</span>PhilippUrbschat
</span>
</td>
</tr>
<tr>
<td>
<p style="font-size: 15px; line-height: 1.6; color: #ffffff; margin: 0 0 16px 0;">
Hallo,
</p>
<p style="font-size: 15px; line-height: 1.6; color: #e2e8f0; margin: 0 0 18px 0;">
du wurdest eingeladen, dir einen persönlichen Zugang auf <strong style="color: #ffffff;">philippurbschat.de</strong> anzulegen.
</p>
' . (!empty($note) ? ' ' . (!empty($note) ? '
<div style="background-color: #020617; border-left: 3px solid #06b6d4; padding: 12px 16px; margin: 20px 0; border-radius: 4px; font-size: 13px; color: #94a3b8;"> <div style="background-color: #020617; border: 1px solid #1e293b; border-left: 3px solid #06b6d4; padding: 12px 16px; margin: 18px 0; border-radius: 8px; font-size: 13px; color: #cbd5e1; line-height: 1.5;">
' . htmlspecialchars($note) . ' ' . htmlspecialchars($note) . '
</div>' : '') . ' </div>' : '') . '
<div style="background-color: #020617; border: 1px solid #1e293b; border-radius: 12px; padding: 16px; margin: 24px 0;"> <div style="background-color: #020617; border: 1px solid #1e293b; border-radius: 12px; padding: 16px 18px; margin: 22px 0;">
<div style="font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #64748b; margin-bottom: 6px;">Freigeschaltete Module:</div> <div style="font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8; margin-bottom: 6px;">Freigeschaltete Module:</div>
<div style="font-size: 13px; font-weight: bold; color: #10b981;">' . htmlspecialchars($modulesText) . '</div> <div style="font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: bold; color: #34d399;">' . htmlspecialchars($modulesText) . '</div>
</div> </div>
<div style="text-align: center; margin: 32px 0;"> <table border="0" cellspacing="0" cellpadding="0" style="margin: 28px auto 24px auto;">
<a href="' . htmlspecialchars($registerUrl) . '" style="display: inline-block; background-color: #10b981; color: #020617; font-weight: bold; text-decoration: none; padding: 14px 28px; border-radius: 12px; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase;"> <tr>
Jetzt Account erstellen <td align="center" style="background-color: #020617; border: 2px solid #10b981; border-radius: 12px;">
</a> <a href="' . htmlspecialchars($registerUrl) . '" target="_blank" style="display: inline-block; padding: 14px 28px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 800; color: #34d399 !important; text-decoration: none !important; letter-spacing: 0.08em; text-transform: uppercase;">
</div> <span style="color: #34d399; font-weight: 800;">Jetzt Account erstellen </span>
</a>
</td>
</tr>
</table>
<p style="font-size: 12px; line-height: 1.6; color: #64748b; margin-top: 30px; word-break: break-all;"> <p style="font-size: 12px; line-height: 1.6; color: #94a3b8; margin-top: 24px; word-break: break-all;">
Falls der Button nicht funktioniert, kopiere bitte diesen Link in deinen Browser:<br> Falls der Button nicht funktioniert, kopiere bitte diesen Link in deinen Browser:<br>
<a href="' . htmlspecialchars($registerUrl) . '" style="color: #06b6d4; text-decoration: underline;">' . htmlspecialchars($registerUrl) . '</a> <a href="' . htmlspecialchars($registerUrl) . '" style="color: #38bdf8; text-decoration: underline; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;">' . htmlspecialchars($registerUrl) . '</a>
</p> </p>
</div> </td>
</tr>
<div style="max-width: 540px; margin: 20px auto 0; font-size: 11px; color: #475569; text-align: center;"> </table>
philippurbschat.de · Leopoldstr. 32 · 32756 Detmold </td>
</div> </tr>
</div>'; </table>
</body>
</html>';
$bodyText = "Hallo,\n\n" $bodyText = "Hallo,\n\n"
. "du wurdest eingeladen, dir einen persönlichen Zugang auf philippurbschat.de anzulegen.\n\n" . "du wurdest eingeladen, dir einen persönlichen Zugang auf philippurbschat.de anzulegen.\n\n"
@ -93,45 +113,65 @@ class MailService {
$subject = 'Passwort zurücksetzen philippurbschat.de'; $subject = 'Passwort zurücksetzen philippurbschat.de';
$bodyHtml = ' $bodyHtml = '<!DOCTYPE html>
<div style="background-color: #020617; color: #e2e8f0; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; padding: 40px 20px; text-align: center;"> <html>
<div style="max-width: 540px; margin: 0 auto; background-color: #0b1120; border: 1px solid #1e293b; border-radius: 20px; padding: 35px 30px; text-align: left; box-shadow: 0 10px 30px rgba(0,0,0,0.5);"> <head>
<div style="font-size: 20px; font-weight: bold; color: #f8fafc; margin-bottom: 25px; letter-spacing: -0.5px;"> <meta charset="UTF-8">
<span style="color: #06b6d4;">_</span>Passwort-Reset <meta name="viewport" content="width=device-width, initial-scale=1.0">
</div> <meta name="color-scheme" content="dark">
<meta name="supported-color-schemes" content="dark">
<p style="font-size: 14px; line-height: 1.6; color: #cbd5e1; margin-bottom: 18px;"> </head>
Hallo, <body style="margin: 0; padding: 0; background-color: #020617; font-family: -apple-system, BlinkMacSystemFont, \'Segoe UI\', Roboto, Helvetica, Arial, sans-serif;">
</p> <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#020617" style="background-color: #020617; width: 100%; padding: 40px 15px;">
<tr>
<p style="font-size: 14px; line-height: 1.6; color: #cbd5e1; margin-bottom: 18px;"> <td align="center">
wir haben eine Anfrage zum Zurücksetzen deines Passworts auf <strong>philippurbschat.de</strong> erhalten. <table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 540px; background-color: #0b1120; border: 1px solid #1e293b; border-radius: 24px; padding: 36px 32px; box-shadow: 0 10px 30px rgba(0,0,0,0.6);" bgcolor="#0b1120">
</p> <tr>
<td style="padding-bottom: 24px;">
<span style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 20px; font-weight: 800; color: #ffffff; letter-spacing: -0.5px;">
<span style="color: #22d3ee;">_</span>Passwort-Reset
</span>
</td>
</tr>
<tr>
<td>
<p style="font-size: 15px; line-height: 1.6; color: #ffffff; margin: 0 0 16px 0;">
Hallo,
</p>
<p style="font-size: 15px; line-height: 1.6; color: #e2e8f0; margin: 0 0 18px 0;">
wir haben eine Anfrage zum Zurücksetzen deines Passworts auf <strong style="color: #ffffff;">philippurbschat.de</strong> erhalten.
</p>
<div style="text-align: center; margin: 32px 0;"> <table border="0" cellspacing="0" cellpadding="0" style="margin: 28px auto 24px auto;">
<a href="' . htmlspecialchars($resetUrl) . '" style="display: inline-block; background-color: #06b6d4; color: #020617; font-weight: bold; text-decoration: none; padding: 14px 28px; border-radius: 12px; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase;"> <tr>
Neues Passwort vergeben <td align="center" style="background-color: #020617; border: 2px solid #06b6d4; border-radius: 12px;">
</a> <a href="' . htmlspecialchars($resetUrl) . '" target="_blank" style="display: inline-block; padding: 14px 28px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; font-weight: 800; color: #22d3ee !important; text-decoration: none !important; letter-spacing: 0.08em; text-transform: uppercase;">
</div> <span style="color: #22d3ee; font-weight: 800;">Neues Passwort vergeben </span>
</a>
</td>
</tr>
</table>
<p style="font-size: 12px; line-height: 1.6; color: #94a3b8; margin-bottom: 18px;"> <div style="background-color: #020617; border: 1px solid #1e293b; border-left: 3px solid #06b6d4; border-radius: 8px; padding: 14px 16px; margin: 20px 0; font-size: 13px; color: #e2e8f0; line-height: 1.5;">
Dieser Link ist aus Sicherheitsgründen <strong>1 Stunde</strong> lang gültig. Dieser Link ist aus Sicherheitsgründen <strong style="color: #ffffff;">1 Stunde</strong> lang gültig.
</p> </div>
<p style="font-size: 12px; line-height: 1.6; color: #64748b; margin-top: 25px; word-break: break-all;"> <p style="font-size: 12px; line-height: 1.6; color: #94a3b8; margin-top: 24px; word-break: break-all;">
Falls der Button nicht funktioniert, nutze bitte diesen Link:<br> Falls der Button nicht funktioniert, nutze bitte diesen Link:<br>
<a href="' . htmlspecialchars($resetUrl) . '" style="color: #06b6d4; text-decoration: underline;">' . htmlspecialchars($resetUrl) . '</a> <a href="' . htmlspecialchars($resetUrl) . '" style="color: #38bdf8; text-decoration: underline; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;">' . htmlspecialchars($resetUrl) . '</a>
</p> </p>
<p style="font-size: 11px; line-height: 1.6; color: #475569; margin-top: 25px; border-top: 1px solid #1e293b; padding-top: 15px;"> <p style="font-size: 11px; line-height: 1.6; color: #64748b; margin-top: 22px; border-top: 1px solid #1e293b; padding-top: 16px;">
Wenn du diesen Reset nicht angefordert hast, kannst du diese Nachricht einfach ignorieren. Dein bisheriges Passwort bleibt unverändert gültig. Wenn du diesen Reset nicht angefordert hast, kannst du diese Nachricht einfach ignorieren. Dein bisheriges Passwort bleibt unverändert gültig.
</p> </p>
</div> </td>
</tr>
<div style="max-width: 540px; margin: 20px auto 0; font-size: 11px; color: #475569; text-align: center;"> </table>
philippurbschat.de · Leopoldstr. 32 · 32756 Detmold </td>
</div> </tr>
</div>'; </table>
</body>
</html>';
$bodyText = "Hallo,\n\n" $bodyText = "Hallo,\n\n"
. "wir haben eine Anfrage zum Zurücksetzen deines Passworts auf philippurbschat.de erhalten.\n\n" . "wir haben eine Anfrage zum Zurücksetzen deines Passworts auf philippurbschat.de erhalten.\n\n"