title: how to send an email alert if a folder is modified
body: <p>I want to get an email alert if a certain folder is modified but how do I pipe the output from the command so it sends an email not just show the changes to the folder in the terminal?</p>
  
  <p>something like the following but... gives an error on the email part</p>
  
  <pre><code>inotifywait -m /home/tom -e create -e moved_to |
      while read path action file; do
          echo "The file '$file' appeared in directory '$path' via '$action'"
          | /usr/bin/Mail -s "notify" "email@12345mail.com"
      done
  </code></pre>