The mail functions in mediawiki mainly include:
1. When registering a new user, an email is sent to the user registration mailbox for confirmation.
2. After the user changes the password, an email is sent to confirm the password.
3. When the user's monitoring page changes, an email will be sent to the user who has registered and monitored the page.
In the Wiki settings, You need to modify the default settings file and the local settings file in the pair des file. In the defaultsettings file, you can set the username, password, and email server information of the Administrator's mailbox.
However, some software packages need to be downloaded and installed before configuration.
The mail and other pear modules must be downloaded and installed independently.
Therefore, the configuration process is summarized as follows:
Download and install the software package
Http://download.pear.php.net/package/Mail-1.2.0.tgz
Http://download.pear.php.net/package/Net_SMTP-1.4.2.tgz
Http://download.pear.php.net/package/Net_Socket-1.0.9.tgz
Install
Pear install Mail-1.2.0.tgz
Pear install Net_SMTP-1.4.2.tgz
Pear install Net_Socket-1.0.9.tgz
Change File
You need to change two files: the default settings file under the pair des and the local settings file.
In the defaultsettings file, you can set the username, password, and email server information of the Administrator mailbox, for example:
$ Wgsmtp = array (
"Host" => 'smtp .opi-corp.com ',
"Idhost" => 'opi -corp.com ',
"Port" => "25 ",
"Auth" => true,
"Username" => 'postmaster's OPI mailbox ',
"Password" => 'administrator password ');
Remember to add $ wgenableuseremail = true; $ wgenableemail = true;
The localsettings file mainly sets the corresponding email service path and the email name corresponding to the sent Email:
$ Path = array ($ IP, "$ IP/DES", "$ IP/ages", "Pear installation path/pear/Pear ", "Pear installation path/Pear ");
$ Wgemergencycontact = "Postmaster OPI email ";
$ Wgpasswordsender = Postmaster OPI email;
Personal Modification
After successful logon, verify the email address in the middle line of my parameter settings, and then select the desired mailbox settings option. Save ......
Complete
Remarks
The settings for canceling authentication are as follows:
In the defaultsettings file, you can set the username, password, and email server information of the Administrator mailbox, for example:
$ Wgsmtp = array (
"Host" => 'smtp .opi-corp.com ',
"Idhost" => 'opi -corp.com ',
"Port" => "25 ",
);
Open the file/uplodes/usermailer. php and find the following line in the "static function send ()" method:
$ Headers['From'] = $ From->Tostring();
Change the final information, as shown in figure
$ Headers['From']=Wiki@opi-corp.com";
Note, however, that the message format must be complete, and the mail server can only be used for registration (here is the opi-corp.com), or else an error occurs.
In addition, if authentication is canceled, all users can only register messages for the opi-corp.com at registration, not for other mail servers, without this restriction when adding authentication.