1、修改配置文件
我的文件路径:C:\xampp\htdocs\mantis\config_defaults_inc.php
修改config_defaults_inc.php中设置“Mantis Email Settings”的相关信息,包括下列内容:
(1) 将$g_administrator_email、$g_webmaster_email、$g_from_email、$g_return_path_email等设为有效的邮件地址;
(2) 将$g_phpMailer_method值设为2,表示以smtp方式发送邮件;
(3)将$g_smtp_hosty设定为有效的邮件服务器主机名,如’smtp.exmail.qq.com’;
(4)为$g_smtp_username 和$g_smtp_passwordy设定一个登录邮件服务器的有效用户账号和口令。
# //Mantis Email Settings
$g_administrator_email='[email protected]';
$g_webmaster_email='[email protected]';
$g_from_email='[email protected]';
$g_return_path_email= '[email protected]';
$g_use_phpMailer = ON; # 使用 PHPMailer 发送邮件
$g_phpMailer_method=2; # PHPMailer 以 SMTP 方式发送 Email
$g_smtp_host='smtp.exmail.qq.com'; # SMTP 服务器
$g_smtp_username = '[email protected]'; # 邮箱登录用户名
$g_smtp_password='**********'; # 邮箱登录密码
备注:以上代码测试成功。