One Liner Email from bash

Simple: # echo “This will go into the body of the mail.” | mail -s “Hello world” you@youremailid.com nJoy 😉  

One Liner to test php sending mail from a bash script

To check if your php installation can successfully send emails from a bash script try this :  php -r ‘var_dump(mail(“david.saliba@testemail.com”, “test subject”, “test body”));’ Thanks Gareth ! nJoy 🙂 !