-
Notifications
You must be signed in to change notification settings - Fork 2
/
worker.js
92 lines (47 loc) · 1.51 KB
/
worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/******
All emails must be in quotes, either single ' or double ".
The list needs to be seperated by a comma.
All emails must first be verified via the email tab.
Note if successful, in Cloudflare dashboard, emails may say dropped. This is the default state.
If it says forwarded you have the email address set to go to a single addresses in the email routes tab.
Change it to send to worker you created.
Only modify the lines between EMAIL START and EMAIL END. Otherwise you could run into issues if you don't under stand how to debug.
*****/
const emailAddresses = [
/***** Add email addresses below ****/
/****** EMAIL START *******/
/****** EMAIL END *******/
]
/***********
DO NOT EDIT ANYTHING BELOW HERE
***********/
/******************
WARNING: Really do not edit below this line
**************/
/****************
You just have to keep scrolling don't you.
*****************/
/****************
ugggg
*****************/
/****************
Ok I guess you don't want to listen
*****************/
/****************
Don't say I didn't warn you.
*****************/
/****************
You are on your own now.
*****************/
/****
Email script for sending the emails
This takes a list of emails from an array and will forward the emails to all verified email accounts.
*****/
export default {
async email(message, env, ctx) {
const forwardList = emailAddresses;
for(const email of forwardList){
await message.forward(email);
}
}
}