The Monit configuration for Gmail mailserver.
For monit <= 5.16:
set mailserver smtp.gmail.com port 587 username "MYUSER" password "MYPASSWORD" using tlsv12
For monit 5.17 or later:
set mailserver smtp.gmail.com port 587 username "MYUSER" password "MYPASSWORD" using tls