After following the instruction, the test mail failed. below is the message from the server log.. looking forward to your help to configure the email setup for webtrees.
MailService: Connection could not be established with host "ssl://smtp.gmail.com:587": stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:ssl3_get_record:wrong version number
1. I did generate a password for the app with the name organicwayfarm.in/webtrees
2. I did try to generate test mail, but it failed with the message I mentioned above.
PS: Though I saved the generated password, when I reopen the settings, webtrees is not displaying the stored password. I'm not sure whether this is expected behavior. Please let me know if you need additional details.