Here’s my efforts on writing wrapper script to send mails from terminal. Looking forward to use this in other useful scripts.

Gmail Scripts