mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
22 lines
366 B
TypeScript
22 lines
366 B
TypeScript
const sendMail = async ({
|
|
email,
|
|
subject,
|
|
message,
|
|
}: Record<string, string>) => {
|
|
const data = {
|
|
email: email,
|
|
subject: subject,
|
|
message: message,
|
|
};
|
|
|
|
return await fetch("/api/send-mail", {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
body: JSON.stringify(data),
|
|
});
|
|
};
|
|
|
|
export default sendMail;
|