For Workes & Pages, what is the name of the domain?
aikoo7.us.kg
What is the error message?
original email is not repliable
What is the issue or error you’re encountering
I am getting the above error when replying to a email
What steps have you taken to resolve the issue?
Search, search and search the web and look into the logs of the worker.
What are the steps to reproduce the issue?
Run this code using using the wrangler cli:
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: "Thank you for your contact", addr: message.to});
msg.setRecipient(message.from);
msg.setSubject("Email Routing Auto-reply");
msg.addMessage({
contentType: 'text/plain',
data: `We got your message`
});
const replyMessage = new EmailMessage(
message.to,
message.from,
msg.asRaw()
);
await message.reply(replyMessage);
}
}
Install the dependencies.
Setup a email rule for it.
Reply an email of the email you had setup.