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

$wgSMTP = [
    'host' => 'ssl://',  // hostname of the email server
    'IDHost' => '',
    'port' => 465,
    'username' => '', // user of the email account
    'password' => '****************',  // app password of the email account
    'auth' => true

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.