Skip to content

Commit 863e836

Browse files
author
gauthier witkowski
committed
Refactor email template
1 parent 90d968c commit 863e836

File tree

1 file changed

+71
-37
lines changed

1 file changed

+71
-37
lines changed

email_template.php

Lines changed: 71 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,92 @@
11
<!DOCTYPE html>
2-
<html lang="en">
2+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
33

44
<head>
5-
<meta charset="UTF-8">
6-
<title><?= $subject; ?></title>
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<meta charset="UTF-8" />
6+
<title>[GITHUB] <?= $subject; ?></title>
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<meta name="x-apple-disable-message-reformatting" />
9+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
810
</head>
911

10-
<body style="margin:0; padding:0; background:#f4f4f4; font-family:Arial, sans-serif;">
11-
<span style="display:none; font-size:1px; color:#ffffff; line-height:1px; max-height:0px; max-width:0px; opacity:0; overflow:hidden; mso-hide:all;">
12-
You've received a new message via the contact form.
12+
<body style="margin:0; padding:0; background:#f0f2f5; font-family:Arial, Helvetica, sans-serif; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;">
13+
<!-- Preheader -->
14+
<span style="display:none; font-size:1px; color:#ffffff; line-height:1px; max-height:0; max-width:0; opacity:0; overflow:hidden; mso-hide:all;">
15+
You've received a new message from the contact form. &#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;&#8203;
1316
</span>
14-
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color:#f4f4f4;">
17+
18+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#f0f2f5;">
1519
<tr>
16-
<td align="center" style="padding:20px;">
17-
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="max-width:600px; width:100%; background:#ffffff; border:1px solid #e0e0e0;">
20+
<td align="center" style="padding:24px 12px;">
21+
22+
<!--[if mso]>
23+
<table role="presentation" width="600" cellpadding="0" cellspacing="0" border="0"><tr><td>
24+
<![endif]-->
25+
26+
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="max-width:600px; width:100%; background:#ffffff; border:1px solid #e6e9ef;">
1827
<tr>
19-
<td align="center" style="background:#4a90e2; color:#ffffff; font-size:20px; font-weight:bold; padding:20px;">
20-
<?= $subject; ?>
28+
<td bgcolor="#2563eb" align="left" style="padding:24px; color:#ffffff; font-size:20px; line-height:24px; font-weight:bold;">
29+
[GITHUB] <?= $subject; ?>
2130
</td>
2231
</tr>
32+
2333
<tr>
24-
<td style="padding:20px; font-size:16px; color:#333333; line-height:1.5;">
25-
<p style="margin:0 0 16px;">
26-
<strong>Date:</strong><br>
27-
<?= $date; ?>
28-
</p>
29-
<p style="margin:0 0 16px;">
30-
<strong>Name:</strong><br>
31-
<?= $name; ?>
32-
</p>
33-
<p style="margin:0 0 16px;">
34-
<strong>Email:</strong><br>
35-
<a href="mailto:<?= $email; ?>" style="color:#4a90e2; text-decoration:none; word-break:break-all;">
36-
<?= $email; ?>
37-
</a>
38-
</p>
39-
<p style="margin:0 0 16px;">
40-
<strong>Message:</strong><br>
41-
<?= $message; ?>
42-
</p>
43-
<hr style="border:0; border-top:1px solid #dddddd; margin:24px 0;">
44-
<p style="font-size:14px; color:#666666; margin:0;">
45-
<strong>IP address:</strong>
46-
<?= $ip; ?>
47-
</p>
34+
<td align="left" style="padding:24px; color:#1f2937; font-size:15px; line-height:1.6;">
35+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
36+
<tr>
37+
<td style="padding:0 0 16px 0;">
38+
<div style="font-size:12px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; margin:0 0 4px 0;">Date</div>
39+
<div style="font-size:15px; color:#111827;"><?= $date; ?></div>
40+
</td>
41+
</tr>
42+
<tr>
43+
<td style="padding:0 0 16px 0;">
44+
<div style="font-size:12px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; margin:0 0 4px 0;">Name</div>
45+
<div style="font-size:15px; color:#111827;"><?= $name; ?></div>
46+
</td>
47+
</tr>
48+
<tr>
49+
<td style="padding:0 0 16px 0;">
50+
<div style="font-size:12px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; margin:0 0 4px 0;">Email</div>
51+
<a href="mailto:<?= $email; ?>" style="font-size:15px; color:#2563eb; text-decoration:none; word-break:break-all;"><?= $email; ?></a>
52+
</td>
53+
</tr>
54+
<tr>
55+
<td style="padding:0;">
56+
<div style="font-size:12px; color:#6b7280; text-transform:uppercase; letter-spacing:.5px; margin:0 0 8px 0;">Message</div>
57+
<div style="margin:0; font-size:15px; line-height:1.7; color:#111827;">
58+
<?= $message; ?>
59+
</div>
60+
</td>
61+
</tr>
62+
</table>
63+
64+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:24px 0;">
65+
<tr>
66+
<td style="border-top:1px solid #e5e7eb; font-size:0; line-height:0;">&nbsp;</td>
67+
</tr>
68+
</table>
69+
70+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
71+
<tr>
72+
<td style="font-size:13px; color:#6b7280;">
73+
<strong style="color:#374151;">IP address:</strong> <?= $ip; ?>
74+
</td>
75+
</tr>
76+
</table>
4877
</td>
4978
</tr>
79+
5080
<tr>
51-
<td align="center" style="background:#f4f4f4; font-size:12px; color:#999999; padding:16px;">
81+
<td bgcolor="#f9fafb" align="center" style="padding:16px; font-size:12px; line-height:18px; color:#6b7280;">
5282
This is an automated message.
5383
</td>
5484
</tr>
5585
</table>
86+
87+
<!--[if mso]></td></tr></table><![endif]-->
88+
89+
<div style="line-height:24px; font-size:24px;">&nbsp;</div>
5690
</td>
5791
</tr>
5892
</table>

0 commit comments

Comments
 (0)