yeah tried all that maybe my limited

yeah, tried all that, maybe my limited knowledge in TS I can't accomplish it Sadge
1 Reply
JustinNoel
JustinNoel2y ago
That sample just had one tiny bit of TypeScript. It was the : PagesFunction. I've removed it in this sample:
import mailChannelsPlugin from "@cloudflare/pages-plugin-mailchannels";
export const onRequest = mailChannelsPlugin({
personalizations: [
{
to: [
{
name: "ACME Support",
email: "support@example.com"
}
]
}
],
from: {
name: "ACME Support",
email: "support@example.com"
},
respondWith: () => {
return new Response(`Thank you for submitting your enquiry. A member of the team will be in touch shortly.`);
}
});
import mailChannelsPlugin from "@cloudflare/pages-plugin-mailchannels";
export const onRequest = mailChannelsPlugin({
personalizations: [
{
to: [
{
name: "ACME Support",
email: "support@example.com"
}
]
}
],
from: {
name: "ACME Support",
email: "support@example.com"
},
respondWith: () => {
return new Response(`Thank you for submitting your enquiry. A member of the team will be in touch shortly.`);
}
});