Email Workers Playground error and dropped emails

When deploying to Email Workers with the wrangler CLI i get this error when simulating an email with the Email Trigger Simulator. There is just an message in the console with "Email Trigger not available to this worker" as seen in the Picture.
Also now when I send an email to the worker it get's dropped. I'm, using the message.reply() function so according to the documentation it should reply (which it does not) OR fail with an error thrown (which it also does not). Does anyone have experience with that? My code:
import { EmailMessage } from "cloudflare:email";
import { createMimeMessage } from "mimetext";

export default {
async email(message, env, ctx) {
const msg = createMimeMessage();
msg.setHeader("In-Reply-To", message.headers.get("Message-ID"));
msg.setSender({ name: "noreply", addr: "[email protected]" });
msg.setRecipient(message.from);
msg.setSubject("Email Routing Auto-reply");
msg.addMessage({
contentType: "text/plain",
data: `Hello
This is an automated reply to your email.`,
});

await fetch("https://discord.com/api/webhooks/xxx", {
method: "post",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
username: "webhook",
content: `${msg.asRaw()}`,
}),
});

var replyMessage = new EmailMessage(
message.from,
msg.asRaw()
);

message.reply(replyMessage);
},
};
import { EmailMessage } from "cloudflare:email";
import { createMimeMessage } from "mimetext";

export default {
async email(message, env, ctx) {
const msg = createMimeMessage();
msg.setHeader("In-Reply-To", message.headers.get("Message-ID"));
msg.setSender({ name: "noreply", addr: "[email protected]" });
msg.setRecipient(message.from);
msg.setSubject("Email Routing Auto-reply");
msg.addMessage({
contentType: "text/plain",
data: `Hello
This is an automated reply to your email.`,
});

await fetch("https://discord.com/api/webhooks/xxx", {
method: "post",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
username: "webhook",
content: `${msg.asRaw()}`,
}),
});

var replyMessage = new EmailMessage(
message.from,
msg.asRaw()
);

message.reply(replyMessage);
},
};
No description
5 Replies
Play
PlayOP12mo ago
When using message.reply() it should work or throw an error: https://developers.cloudflare.com/email-routing/email-workers/reply-email-workers/
Reply to emails from Workers · Cloudflare Email Routing docs
You can reply to incoming emails with another new message and implement smart auto-responders programmatically, adding any content and context in the …
Play
PlayOP12mo ago
There are a few requirements but I pass them all Yeah it's very new and is kinde buggy ig? I'm using vanilla javascript with the wrangler CLI (as just in the dashboard the NPM dependencies do not work). According to documentation it's GA but very new
Play
PlayOP12mo ago
The Log also looks fine
No description
kian
kian12mo ago
reply should be awaited
When the promise resolves, the message is confirmed to be replied.
Play
PlayOP12mo ago
Jup this did the trick, I feel kinde stupid rn. (Cloudflare should probably change it in their documentation tho) Thank you so much
Want results from more Discord servers?
Add your server