Manual:$wgSMTP/Gmail

This page provides an example for setting the  configuration parameter if you would like to use Gmail for sending emails by your wiki.

After providing this you may get an authentication failure type error. You will need to sign into the gmail account you are using and verify that the person that just signed in is you. You only need to verify this one time. For this Gmail will send you an email and you just follow the instructions.