Skip to content

Commit

Permalink
test CF
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Jul 25, 2024
1 parent 31071b1 commit ebd2e1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/admin_mailer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const sendAdminEmail = async ({
if (canCreateTransport) {
return await sendAdminEmailNodemailer({ subject, body })
} else {
console.log("scf")
return await sendAdminEmailCloudflareWorkers({ subject, body })
}
}
Expand Down Expand Up @@ -98,6 +99,7 @@ const sendAdminEmailCloudflareWorkers = async ({
subject: string
body: string
}) => {
console.log("cf2")
const send_request = new Request("https://api.mailchannels.net/tx/v1/send", {
method: "POST",
headers: {
Expand All @@ -122,6 +124,7 @@ const sendAdminEmailCloudflareWorkers = async ({
}),
})

console.log("cf3")
const response = await fetch(send_request)
console.log("MailChannels API response:", response)
if (!response.ok) {
Expand Down

0 comments on commit ebd2e1e

Please sign in to comment.