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
LUA script to send email depending on user session
-
IEAWingFTPServer
- Posts: 1
- Joined: Thu Mar 26, 2026 3:35 am
-
FTP
- Site Admin
- Posts: 2169
- Joined: Tue Sep 29, 2009 6:09 am
Re: LUA script to send email depending on user session
The script seems fine. So could you send email via following script with "Administration > Console"?
c_SendMail("test@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
c_SendMail("test@test.org","A file was uploaded.","%Name uploaded %PathName","","LocalSMTPServer")
Wing FTP Server
English
Deutsch
简体中文