Hello,
we'd live to configure notification emails for Group instead of account.
Now we have configured something like this
if ("%Name" == "test") then
c_SendMail("test@test.it","text","text","","smtp")
end
Is it possible to substitute account name (%Name) with group?
Which is the syntax for Group name?
I tried with %Group and %GroupName but it didn't work
Email notifications for Group
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Email notifications for Group
OK, here is an example, finding the first group, and send email for the first group, anyway, you can modify the following Lua script for your own requirement:
Code: Select all
do
local user = c_GetUser("%Domain", %Name)
local grouplist = user["usergroups"]
for _,tempgroup in pairs(grouplist) do
local groupname= tempgroup["groupname"]
if groupname == "CUSTOMERS" then
c_SendMail("test111@test.it","text","text","","smtp")
break
elseif groupname == "BOSS" then
c_SendMail("test222@test.it","text","text","","smtp")
break
end
end
end
-
- Posts: 31
- Joined: Tue Nov 07, 2017 7:31 pm
Re: Email notifications for Group
anyone have something like this working with version 5.0.9 ?
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Email notifications for Group
I think it can work for the recent versions, any problem?seattle wrote:anyone have something like this working with version 5.0.9 ?