How do i do this?
So for a special purpose i am trying to forward all emails to 5 seperate emails, how do i do this?
email workers btw
this is my current code and it obviously doesnt work
export default {
async email(message, env, ctx) {
const allowList = [""];
if (allowList.indexOf(message.headers.get("from")) == -1) {
await message.forward("1@email.com");
await message.forward("2@email.com");
await message.forward("3@email.com");
await message.forward("4@email.com");
await message.forward("5@email.com");
} else {
}
}
}
email workers btw
this is my current code and it obviously doesnt work
export default {
async email(message, env, ctx) {
const allowList = [""];
if (allowList.indexOf(message.headers.get("from")) == -1) {
await message.forward("1@email.com");
await message.forward("2@email.com");
await message.forward("3@email.com");
await message.forward("4@email.com");
await message.forward("5@email.com");
} else {
}
}
}