LUA sendmail script executes multiple times
Posted: Mon Mar 28, 2011 9:49 am
I have created a FTP Event to Write Log OnFileUploaded
This creates %Name_%DD%MM%YYYY.txt and appends a line for each file uploaded.
This works as expected.
I have also created another FTP Event OnUserDisconnect
This runs the following LUA Script:
if ("%Name" == "ACME") then c_SendMail("user@email.co.uk","%Name FTP Activity","Please check log for file upload activity","D://logs/Upload/%Name/%Name_%DD%MM%YYYY.txt","SMTP1")
end
This executes on disconnect, sends the email with the log file attached.
Sounds perfect EXCEPT the email is sent 3 times. Any ideas?
This creates %Name_%DD%MM%YYYY.txt and appends a line for each file uploaded.
This works as expected.
I have also created another FTP Event OnUserDisconnect
This runs the following LUA Script:
if ("%Name" == "ACME") then c_SendMail("user@email.co.uk","%Name FTP Activity","Please check log for file upload activity","D://logs/Upload/%Name/%Name_%DD%MM%YYYY.txt","SMTP1")
end
This executes on disconnect, sends the email with the log file attached.
Sounds perfect EXCEPT the email is sent 3 times. Any ideas?