mailer implemented

This commit is contained in:
Owen Rees
2023-06-21 14:11:16 +02:00
parent 5fd8b35762
commit b323d07d12
11 changed files with 220 additions and 56 deletions
+22
View File
@@ -0,0 +1,22 @@
const sendMail = async ({
email,
subject,
message,
}: Record<string, string>) => {
const data = {
email: email,
subject: subject,
message: message,
};
const response = await fetch("/api/send-mail", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(data),
});
return response;
};
export default sendMail;