Difference between revisions of "Wiki - Email Setup"

From Da Nerd Mage Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
(So far, this page is mostly a copy-pasta of [https://www.mediawiki.org/wiki/Manual:$wgSMTP#Gmail these instructions]... Watch for future refinements.)
(So far, this page is mostly a copy-pasta of [https://www.mediawiki.org/wiki/Manual:$wgSMTP#Gmail these instructions]... Watch for future refinements.)


= Create & configure a Gmail account for your wiki =
= Using Gmail =
== Create & configure a Gmail account for your wiki ==
# Head over to [https://gmail.com/ Gmail]
# Head over to [https://gmail.com/ Gmail]
#* If you already use Gmail, you'll probably find yourself already signed in...
#* If you already use Gmail, you'll probably find yourself already signed in...
Line 12: Line 13:
# Follow [https://support.google.com/accounts/answer/185833 these directions] to set up an '''App Password''' for MediaWiki to use the account.
# Follow [https://support.google.com/accounts/answer/185833 these directions] to set up an '''App Password''' for MediaWiki to use the account.


= Configure your wiki to use the Gmail account =
== Configure your wiki to use the Gmail account ==
* <code class="mwt-code" >sudo vi LocalSettings.php</code>:
* <code class="mwt-code" >sudo vi LocalSettings.php</code>:


Line 28: Line 29:


After 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. (gmail will send you an email and you just follow the instructions)
After 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. (gmail will send you an email and you just follow the instructions)
= Using a locally hosted SMTP server =
Coming soon...
(With any luck...)


[[Category:WikiServers]]
[[Category:WikiServers]]

Latest revision as of 15:07, 4 January 2022

In order for MediaWiki to use email (confirmations, notifications, Special:Emailuser), you'll need to configure it to use a mail server.

I've done this through Gmail here.  (Any email you get from this server is being sent by the.nerd.mage@gmail.com)

(So far, this page is mostly a copy-pasta of these instructions... Watch for future refinements.)

Using Gmail

Create & configure a Gmail account for your wiki

  1. Head over to Gmail
    • If you already use Gmail, you'll probably find yourself already signed in...
    • If this is the case, click your profile link (top right corner) & select Add another account.
    • If not, follow the directions to create an account.
  2. Follow these directions to set up an App Password for MediaWiki to use the account.

Configure your wiki to use the Gmail account

  • sudo vi LocalSettings.php:
###############
# Email Setup #
###############
$wgSMTP = [
    'host' => 'ssl://smtp.gmail.com',  // hostname of the email server
    'IDHost' => 'gmail.com',
    'port' => 465,
    'username' => 'YOURNAME@gmail.com', // user of the email account
    'password' => '****************',  // app password of the email account
    'auth' => true
];

After 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. (gmail will send you an email and you just follow the instructions)

Using a locally hosted SMTP server

Coming soon...

(With any luck...)