Skip to content

Commit d15ae65

Browse files
Script action code snippet
Notify Manager on User Deactivation
1 parent e0580b5 commit d15ae65

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(function(current, event, parm1, parm2) {
2+
var userName = parm1;
3+
var managerEmail = parm2;
4+
5+
var subject = 'User Deactivated: ' + userName;
6+
var body = 'Hello,\n\n' +
7+
'The user "' + userName + '" has been deactivated due to inactivity.\n\n' +
8+
'Regards,\nSystem Administrator';
9+
10+
// Send the email using GlideEmailOutbound (manual way)
11+
var mail = new GlideEmailOutbound();
12+
mail.setSubject(subject);
13+
mail.setBody(body);
14+
mail.setTo(managerEmail);
15+
mail.send();
16+
})(current, event, parm1, parm2);
17+

0 commit comments

Comments
 (0)