title: Getting server to send mail via SSH
body: <p>I had written a program (In Android, client side and PHP, server side) to upload a file to a server over HTTP. Due to various reasons I had to change the system to do everything in SSH (for security among other things).</p>
  
  <p>I have the basics set up (using jsch on Android). But I want to implement the equivalent of the PHP mail() function. When the file is uploaded, originally my PHP file automatically sends a mail from the server to a certain address. </p>
  
  <p>I'm struggling to find a way to implement this within a shell on the server. So the question is, how do I automatically send an email from server in SSH?</p>
  
  <p>EDIT:
  Forgot to mention server is CentOS.</p>