Compare commits

...

6 Commits

1 changed files with 6 additions and 7 deletions

View File

@ -19,20 +19,19 @@ export async function onRequestPost(context) {
Authorization: "Bearer " + context.env.MAILERSEND_API_KEY, Authorization: "Bearer " + context.env.MAILERSEND_API_KEY,
"Content-Type": "application/json" "Content-Type": "application/json"
}, },
body: JSON.stringify({ body: JSON.stringify({ from: {
from: { email: email,
email: "contact@laforceit.com", name: name
name: "Daniel LaForce"
}, },
to: [ to: [
{ {
email: "daniel.laforce@laforceit.com", email: "daniel@laforceit.com",
name: "Daniel LaForce" name: "Daniel LaForce"
} }
], ],
subject: `[LaForceIT] ${subject}`, subject: `ArgoBox Contact Form: ${subject}`,
html: ` html: `
<h2>New Contact Message</h2> <h2>New Contact Message on LaForceIT.com</h2>
<p><strong>Name:</strong> ${name}</p> <p><strong>Name:</strong> ${name}</p>
<p><strong>Email:</strong> ${email}</p> <p><strong>Email:</strong> ${email}</p>
<p><strong>Message:</strong><br>${message.replace(/\n/g, "<br>")}</p> <p><strong>Message:</strong><br>${message.replace(/\n/g, "<br>")}</p>