Skip to content

Commit ce3c1a2

Browse files
celsopenalosa
andauthored
Update src/content/docs/email-routing/email-workers/local-development.mdx
Co-authored-by: Somhairle MacLeòid <[email protected]>
1 parent 40d3dd8 commit ce3c1a2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/content/docs/email-routing/email-workers/local-development.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,13 @@ Consider this example Email Worker script that uses the opensource [postal-mime]
4242
import * as PostalMime from 'postal-mime';
4343

4444
export default {
45-
46-
async email(message, env: any, ctx: any) {
45+
async email(message, env, ctx) {
4746
const parser = new PostalMime.default();
4847
const rawEmail = new Response(message.raw);
4948
const email = await parser.parse(await rawEmail.arrayBuffer());
5049
console.log(email);
5150
},
52-
5351
};
54-
```
5552

5653
Now when you run `npx wrangler dev`, wrangler will will expose a local `/cdn-cgi/handler/email` endpoint that you can `POST` email messages to and trigger your Worker script `email()` handler:
5754

0 commit comments

Comments
 (0)