Outgoing mail server configuration

Dear ERP Next team,
even if i configured my email account correctly it brings a message invalid outgoing mail server or port.
for more infor am using the virtual machine on ubuntu 14.04
i give my email and password
domain.i didnt insert anything
service, Gmail
then i enabled outgoing only
smtp server: smtp.gmail.com
then i thick USE TSl and port 587
then save it.
also i have allow access on my gmail account
so what shall i do please?
thanks

Hi @fikerjayz

Or easy way you can edit site_config.json to send email

 "auto_email_id": "youremail@gmail.com",
"mail_login": "youremail@gmail.com", 
 "mail_password": "your_password", 
 "mail_port": 587, 
 "mail_server": "smtp.gmail.com", 
 "use_ssl": 1

This didn’t work at all!, Rather it created more issues and I had to roll back.