1.修改/var/www/html/mantisbt-1.3.3/config下config_inc.php配置文件 以163邮箱为例
# --- Email Configuration --- $g_enable_email_notification=ON; $g_phpMailer_method = PHPMAILER_METHOD_SMTP; $g_smtp_host = 'smtp.163.com'; $g_smtp_username = '*******@163.com'; $g_smtp_password = '*******'; $g_webmaster_email = '*******@163.com'; $g_from_email = '*******@163.com'; $g_return_path_email = '*******@163.com'; # $g_from_name = 'Mantis Bug Tracker'; # $g_email_receive_own = OFF; # $g_email_send_using_cronjob = OFF;
2.重启服务,可以通过注册用户测试是否设置成功,注册账户时将发送确认邮件让用户设置登录密码
如果没有成功发送邮件,可以通过以下命令查看Linux系统是否允许发信:
getsebool httpd_can_sendmail
getsebool httpd_can_network_connect
如果查询的结果为OFF,通过以下命令进行修改:
setsebool -P httpd_can_sendmail 1
setsebool -P httpd_can_network_connect 1
重启服务,OK。