Mantis配置邮件功能
Mantis主要有两个配置文件,config_inc.php和config_defaults_inc.php ,数据库只需要配置config_inc.php,而邮件部分两者要按如下配置进行。
1)首先贴出mantis的config_inc.php主配置文件中数据库段配置:
# — Database Configuration —
$g_hostname = ‘localhost’;
$g_db_username = ‘root’;
$g_db_password = ‘123pwd’;
$g_database_name = ‘mantis’;
$g_db_type = ‘mysql’;
$g_default_timezone = ‘Asia/Shanghai’; 若无此段,将会出现时区不对应。
2)关于邮件部分:
邮件部分要config_inc.php和config_defaults_inc.php配置文件保持一致。
config_inc.php中修改相应部分。
$g_administrator_email = ‘[email protected]’;
$g_webmaster_email = ‘[email protected]’;
$g_from_email = ‘[email protected]’;
$g_return_path_email = ‘[email protected]’;
$g_enable_email_notification = ON;
$g_phpMailer_method = PHPMAILER_METHOD_SMTP;
$g_smtp_host = ‘mail.wmhope.com’;
$g_smtp_username = ‘[email protected]’;
$g_smtp_password = ‘123pwd’;
$g_smtp_port = 25;
config_defaults_inc.php 配置中修改响应部分。
$g_mail_priority = 3;
$g_phpMailer_method = 2;
$g_smtp_host = ‘mail.wmhope.com’;
$g_smtp_username = ‘[email protected]’;
$g_smtp_password = ‘123pwd’;
$g_smtp_connection_mode = ‘tls’;
$g_smtp_port = 25;
3)php的相关配置
打开php.ini 主配置文件找到如下段并修改。
SMTP = mail.wmhope.com
smtp_port = 25
sendmail_path =/usr/sbin/sendmail -t
修改完成之后重启apache并用登录管理员帐号访问mantis的邮件测试地址测试。http://192.168.100.10:8055/mantis/admin /test_email.php