Email setup hanging for gmail

HI We are a energy company from Bangalore trying to install erpnext on Ubuntu 14.04 fresh install on a VM of our internal server.

We are keen to use ERP next for our operations We were very impressed with your erp and have installed the same on Ubuntu 14.04. But we are facing certain problems with email configuration and could not solve it by going through the blogs and support .

The email setup page hangs when we try to save the settings for GApps and get the message’SAVING".We are trying to connect using GMAIL.

We need to reload the page and come out.We have done all the settings as per the instructions in your manual as well as videos but are unable to solve this issue.CAN ANYONE HELP US SOLVE THE ISSUE.

Regards
Nalin
Screenshots

GMail usually works fine. Do you see any exception in your JS console?