ducquoc - 2017-06-04

The host server should be smtp.gmail.com instead of imap.gmail.com , i.e.

mail.host=smtp.gmail.com

Other info seems OK, port 465, use authentication with working username/password.

(Besides, if you want to use IMAP for your email client you have to explicit enable it in Gmail settings - it's disabled by default).