Hi,
I got a solution for moodle3.2
Go to site administrator --> Server --> Email --> outgoing Mail Configuration and configure it as below
First just follow https://docs.moodle.org/32/en/Email_setup_gmail
Go to wamp\bin\apache\apache2.4.23\bin\php.ini
;extension=php_openssl.dll ---> remove ; to uncomment it if it is not
Than restart wamp
Go to this url -->
https://www.google.com/settings/security/lesssecureapps and turn it on
Install plugin eMail Test to test
It worked for me.