https://docs.moodle.org/37/en/Email_setup_gmail. No first hand experience, sorry! There're some details in this discussion "Moodle 3.7 Mail Send issue" https://moodle.org/mod/forum/discuss.php?d=388894.
General help
Gmail Setup in Moodle
This discussion has been locked so you can no longer reply to it.