Page 1 of 1

Email notifications for Group

Posted: Wed Jun 18, 2014 3:55 pm
by impact
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

Re: Email notifications for Group

Posted: Mon Jun 30, 2014 7:20 am
by impact
Anyone???

Re: Email notifications for Group

Posted: Fri Jul 04, 2014 6:05 am
by FTP
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

Re: Email notifications for Group

Posted: Thu Sep 13, 2018 12:13 am
by seattle
anyone have something like this working with version 5.0.9 ?

Re: Email notifications for Group

Posted: Thu Sep 13, 2018 12:40 pm
by FTP
seattle wrote:anyone have something like this working with version 5.0.9 ?
I think it can work for the recent versions, any problem?