Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've configured a server (Ubuntu) with OpenSSH for file transfer via sFTP. The requirement is that after a file transfer, a mail is sent confirming the file was received by the system. How would I do this without having to poll the directory every x time for new/changed files?

share|improve this question

Refer Checking script results and Send a mail and Automate file transfers (or synchronization) to FTP server or SFTP server

Example: sending a email using command prompt /script=example.txt
if errorlevel 1 goto error

echo Success
sendmail.exe -t < success_mail.txt
goto end

echo Error!
sendmail.exe -t < error_mail.txt


Refer one more answer related to sending an email, Sending mail from the command line, in an automated way

share|improve this answer
Thanks for your answer, however this is on the client side, I'd like to do this on the server side without any additional commands issued by the client. – Gunther De Poortere Jan 26 '12 at 10:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .