Email worker, with fetch, sending to API
I am trying to set up a catch-all email, and send all incoming emails to a worker.
The work is to send the email to my API. the API will then handle the rest.
Right now, I am getting rejected emails that the address dose not exist.
While editing the worker, I noticed "Error: No fetch handler!"
3 Replies
@stevenjr1988 u can adapt this code to your needs:
https://github.com/Tyler-OBrien/cloudflare-worker-emails-to-discord/blob/master/index.js
GitHub
cloudflare-worker-emails-to-discord/index.js at master · Tyler-OBri...
Use Email Workers to forward the emails you receive to a discord webhook - Tyler-OBrien/cloudflare-worker-emails-to-discord
You cant send message like that, the body is a Stream, u need to 'process' it
Refer to this Forum post : https://discord.com/channels/595317990191398933/1209897275816411136
Have you ever completed this @stevenjr1988? I have a similar requirement, but my POST request is treated as GET and got 302 redirection instead. My API endpoint was used by another tool and was just fine to make the request without redirection issue.