use custom header for guestbook IP

This commit is contained in:
Roscoe 2026-02-24 23:36:14 +00:00
commit f58a3c9483
Signed by: RoscoeDaWah
SSH key fingerprint: SHA256:Hqn452XQ1ETzUt/FthJu6+OFkS4NBxCv5VQSEvuk7CE
2 changed files with 9 additions and 3 deletions

View file

@ -35,14 +35,20 @@ public function addEntry(Request $request): RedirectResponse {
->from(new Address("wah@wah.moe", "wah dot moe"))
->to(new Address("roscoe@wah.moe", "Roscoe D. Wah"))
->subject("New Guestbook Entry!")
->category("Guestbook entry")
->html('
<style> td { padding: 5px } </style>
<style> td { padding: 5px; vertical-align: top } </style>
<table border="1">
<tr><td><b>Name:</b></td><td>'.htmlentities($newEntry->name).'</td></tr>
<tr><td><b>IP:</b></td><td>'.$newEntry->ip.'</td></tr>
<tr><td><b>Agent:</b></td><td>'.htmlentities($newEntry->agent).'</td></tr>
<tr><td><b>Message:</b></td><td>'.htmlentities($newEntry->message).'</td></tr>
</table>');
</table>')
->text('Name: '.htmlentities($newEntry->name).
'IP: '.$newEntry->ip.
'Agent: '.htmlentities($newEntry->agent).
'Message: '.htmlentities($newEntry->message)
);
MailtrapClient::initSendingEmails(
apiKey: config('services.mailtrap-sdk.apiKey')