Академический Документы
Профессиональный Документы
Культура Документы
I am using the send mail feature for OnFileUploaded and it works great but I've been asked Tue O ct 13,
"can this email notice only go to the people that are members of the group belonging to the
2015 6:56 pm
file share that the document was uploaded into?".
All I'm doing today is super simple but global as it sends to a distribution mailbox with an
email body of; %Name from %IP uploaded %PathName using %ClientVersion
I'm hoping someone has had this need before me and I'm guessing they would have used Lua
to tackle this need.
Thanks, in advance.
2009 6:09 am
CODE: SELECT ALL
You can add the above Lua script into the event "OnFileUploaded -> Lua script".
And, "SMTP_CONFIG" is the smtp configuration name at the "Servers -> Settings -> SMTP
Manager".
https://bbs.wftpserver.com/viewtopic.php?f=6&t=3183 1/3
3/17/2019 Wing FTP Software - Forum - looking for Lua assistance
I've been working with the system and think it's great but I ran into a user request I'm 4
2015 6:56 pm
I have been working a little with Lua, (never used it before), and writing a script in shell and
passing it variable valuables through the Execute Program tab that is triggered under HTTP
OnFileUploaded.
My issue is the Lua script offered here and anything called from shell work fine but can only
notify a single person or list of people if the email is sent to a distribution list on the email
server.
What I can't find are groups and members variables. What I'm getting asked to do is this;
there are outside clients uploading into wftpserver and a notice is sent to internal staff, this
is good. But, the internal staff will upload a file into the folder assigned to the outside
clients and they would like an email notice sent to that client to let them know it is ready for
download.
The outside clients are all in a common group, i.e. group ABC has members bob, jane and
ted sharing a directory /home/abc and group XYZ has members mary, harry, and phil
sharing a directory /home/xyz
When the internal staff uploads a file into /home/abc they want an email sent to bob, jane,
and ted to let them know to come download the file. If the staff uploads a file into
/home/xyz then they want a notice sent to mary, harry and phil to come download it.
I don't see variables to know what groups people are in for using Lua or shell scripts or perl.
Is this possible to do with Lua or an external script?
2009 6:09 am
1. You can use some hard-coded Lua script, specify the group members for each folder.
2. When a user uploads a file, then you can know the groups this user belongs to, then you
can send emails to the other members of those groups.
2015 6:56 pm
I'm wondering... I have had my best luck using shell script or perl and passing vars using the
Execute Program feature but that's really because I have never used Lua and I'm getting
carried away with a custom email message that would be tough to type inside the little Lua
dev window. :-)
I can easily pass the directory it has been uploaded into. I have my users in common groups
and those common groups have common shared directories. Is there a group variable I can
https://bbs.wftpserver.com/viewtopic.php?f=6&t=3183 2/3
3/17/2019 Wing FTP Software - Forum - looking for Lua assistance
pass out to an external script? I didn't see one in the manual. If not, can i create one using
Lua to pass to an external script?
Thanks again.
Display posts from previous: All posts Sort by Post time Ascending Go
WHO IS ONLINE
Users browsing this forum: No registered users and 1 guest
Board index The team • Delete all board cookies • All times are UTC
https://bbs.wftpserver.com/viewtopic.php?f=6&t=3183 3/3