LUA script to send email depending on user session
Posted: Thu Mar 26, 2026 3:47 am
I have this LUA script to look at user session and send an email when a file is uploaded to two different email adressess. It is not working, no email.
However, when I use the Send Email option not LUA script, it works. But with that it will send when anyone uploads a file.
What did I do wrong?
if "%Name" == "FTPA" then
c_SendMail("test@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
elseif "%Name" == "FTPD" then
c_SendMail("test2@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
end
However, when I use the Send Email option not LUA script, it works. But with that it will send when anyone uploads a file.
What did I do wrong?
if "%Name" == "FTPA" then
c_SendMail("test@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
elseif "%Name" == "FTPD" then
c_SendMail("test2@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
end