We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69c730d commit e3a5e75Copy full SHA for e3a5e75
Server-Side Components/Scheduled Jobs/Unblock bounced email address/script.js
@@ -0,0 +1,21 @@
1
+
2
+ var blockedGR = new GlideRecord('sys_blocked_email_address');
3
+ blockedGR.addQuery('fail_count', '>', 8);
4
+ blockedGR.query();
5
6
+ while (blockedGR.next()) {
7
+ var userGR = new GlideRecord('sys_user');
8
+ userGR.addQuery('email', blockedGR.email_address);
9
+ userGR.addQuery('active', true);
10
+ userGR.query();
11
12
+ if (userGR.next()) {
13
+ // Update user record
14
+ userGR.state = 'new';
15
+ userGR.update();
16
17
+ // Reset fail_count on blocked email record
18
+ blockedGR.fail_count = 0;
19
+ blockedGR.update();
20
+ }
21
0 commit comments