fix up message content

This commit is contained in:
Elizabeth Hunt 2024-01-07 01:42:35 -07:00
parent b09e1e6032
commit 96ffec08bf
Signed by: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -69,18 +69,16 @@ export async function post({ request }) {
}; };
} }
const text = `<h1>new MMT message</h1> const text = `<p>New MMT Message</h1>
<p>Name: ${body.name}</p> <p>Name: ${body.name}</p>
<p>Phone Number: ${body.phone || 'Not Given'}</p> <p>Phone Number: ${body.phone || 'Not Given'}</p>
<p>Email: ${body.email}</p> <p>Email: ${body.email}</p>
<hr> <hr>
<br> <br>
<p>${body.message}</p> <p>${body.message}</p>`;
<br>
<p>brought to you by <a href="https://github.com/Simponic/mistymountains">simponic</a></p>`;
const messageSent = await mailer const messageSent = await mailer
.sendMail(FORM_TO_EMAIL, `New Message From ${body.name}`, text) .sendMail(FORM_TO_EMAIL, `[MMT-FORM]: New Message From ${body.name}`, text)
.then(() => true) .then(() => true)
.catch((error) => { .catch((error) => {
console.error(error); console.error(error);