Recently, the project needs bug management software, in line with the principle of not spending money to do big things, in the open source bug management system to find, or choose MANTISBT, installation is simple (especially for the server we have configured the PHP environment), almost as long as the installation package to extract to the specified directory, Configure the database, restart the next nginx will be done. But the mail configuration still makes me a little bit more God.
MANTISBT registered users, is the need to send mail to the registered user's mailbox, and then click on the link in the mail to complete the registration, although there is a way to modify the database, but a little bit of perfectionist inclination, I would like to be able to send mail directly.
To configure MANTISBT mail, you need to change the following three files
1 php.ini file, CentOS, this file is usually placed in the ETC directory. Below I directly to the content of my configuration excerpt:
; For Unix only. Supply arguments as well (default: "Sendmail-t-i").
Sendmail_path =/usr/sbin/sendmail-t-F Email Address
Because I got the server has installed SendMail, directly used, the default parameter is-t-i, after practice needs to be modified to-t-f e-mail address, in order to send the normal
2 config_inc.php, this file is stored in the root directory of the MANTISBT file and needs to be configured in the relevant mail section as follows:
#---Email Configuration---
$g _phpmailer_method = 2; # or PHPMAILER_METHOD_SMTP, Phpmailer_method_sendmail
$g _smtp_host = ' smtp.163.com '; # used with phpmailer_method_smtp
$g _smtp_username = ' username '; # used with phpmailer_method_smtp
$g _smtp_password = ' password '; # used with phpmailer_method_smtp
$g _administrator_email = ' email address ';
$g _webmaster_email = ' email address ';
$g _from_email = ' email address '; # the "From:" field in emails
$g _return_path_email = ' email address '; # The return address for bounced mail
It is particularly important to note that the value of G_phpmailer_method needs to be set to 2. About the SMTP server, I have tried Gmail, but did not succeed, and finally the use of 163, there are plans to get a mail server myself, that is something.
3 Config_defaults_ inc.php, this file is also stored in the root directory of MANTISBT, I personally understand that this configuration folder is the default version of the previous copy, I also set up here, there has not been done not set up this configuration file of the experiment, set the configuration items are as follows:
$g _phpmailer_method = 2;
$g _smtp_host = ' smtp.163.com ';
$g _smtp_username = ";
$g _smtp_password = ";
With this setting, it should be possible to send messages at least 163 mailboxes.