Azure websites & MediaWiki: how to enable emails sending

▼魔方 西西 提交于 2019-12-11 01:28:06

问题


for example, when user creates an account, resets password etc.

First step is to set mail server credentials in LocalSettings.php file, as per this document: http://www.mediawiki.org/wiki/Manual_talk:$wgSMTP#Example_using_Google_Mail

But after you do this, you will get "PEAR mail package is not installed" error message. How to solve this?


回答1:


Turns out it's relatively simple:

  1. Make sure your mail server credentials are correct
  2. FTP to root folder and rename index.php into index.php.old - otherwise it gets overridden
  3. Install PEAR manager, using "Hosted website" workflow
  4. Rename pear.conf into pear.ini - otherwise you won't be able to start web manager
  5. Create .user.ini file in your root folder and add your physical path to pear into *include_path* variable - kudoz to this article: http://chrisrisner.com/Using-PEAR-with-Windows-Azure-Websites-and-PHP
  6. Open web manager (http://domain.name/index.php) and install the following packages in PEAR (not sure if some of them are redundant but after I installed them, i was able to connect to GMAIL server)

    • Auth_SASL
    • Mail
    • Mail_Mime
    • Net_SMTP
  7. Rename index.php into index.php.pear, and go-pear.php into go-pear.php.pear, and rename index.php.old back to index.php

  8. Try to register - you should get an email



来源:https://stackoverflow.com/questions/17981481/azure-websites-mediawiki-how-to-enable-emails-sending

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!