I am using Java mail api to send a mail using
Must issue a STARTTLS command first
The GMail smtp server seems to require TLS authentication. (See here). Which means that the server will reject your query if you do not enable TLS.
So yes, to connect to GMail you need to enable TLS. For a general mail server there usually is no need.