1

我在 XAMPP 中部署了 matisbt 1.2.12。我无法配置电子邮件(Microsoft Exachnage 服务器)。我的 config_inc 看起来像这样:

    <?php
         $g_hostname = 'localhost';
         $g_db_type = 'mysql';
         $g_database_name = 'bugtracker';
         $g_db_username = 'root';
         $g_db_password = 'XXXXXX';
         #Branding Mantis
         #Display
         $g_window_title = 'XXXXX';
         $g_favicon_image='images/XXXX';
         $g_logo_url = 'http://XXXX';
         $g_logo_image = 'images/XXXXX'; 
         #SMTP Config
         $g_log_level = LOG_EMAIL | LOG_EMAIL_RECIPIENT;
         $g_log_destination = 'file:D:/Bug_tracker/xampp/apache/logs/mantisbt.log';
         $g_allow_signup    = ON;  //allows the users to sign up for a new account
         $g_enable_email_notification = ON; //enables the email messages
         $g_phpMailer_method = PHPMAILER_METHOD_SMTP;
         $g_smtp_host = 'XXXXX';
         $g_smtp_connection_mode = 'tls';
         $g_smtp_port = '25';
         $g_smtp_username = 'XXXXXXX';
         $g_smtp_password = 'XXXXXX';
         $g_from_email = 'XX@XXXX';
         $g_administrator_email = 'XXXXXXXX'; 
         $g_from_name         = 'XXX Bug Tracker';
     ?>

主机是交换服务器的 IP 地址。$g_log_destination 的日志文件给出

电子邮件的密码重置 = 此处的用户电子邮件 ID
2013-03-07 13:31 EST 邮件处理 27 条排队消息
2013-03-07 13:31 EST 邮件发送消息 #52 在 2013-03-07 13:31 EST 排队
2013-03-07 13:31 EST 邮件发送消息 #51 在 2013-03-07 13:20 EST 排队
2013-03-07 13:31 EST 邮件发送消息 #50 在 2013-03-07 13:13 EST 排队
2013-03-07 13:31 EST 邮件发送消息 #49 在 2013-03-07 13:04 EST 排队
2013-03-07 13:31 EST 邮件发送消息 #48 在 2013-03-07 12:53 EST 排队

我也试过 $g_smtp_connection_mode = 'ssl' 。当我将 PHPMAILER_METHOD_SMTP 放在单引号内时。电子邮件内容在文件夹 xampp\tmp\mailoutput 中生成

我已经从http://www.mantisbt.org/forums/viewtopic.php?f=3&t=15398下载了 testmail.php 。它工作正常。

4

1 回答 1

1

尝试配置以下一组行以放入您的 config_inc.php

# --- Database Configuration ---
$g_hostname      = 'hostname.com';
$g_db_username   = 'username';
$g_db_password   = 'password';
$g_database_name = 'dbname';
$g_db_type       = 'mysql';

# --- Anonymous Access / Signup ---
$g_allow_signup             = ON;
$g_allow_anonymous_login    = OFF;
$g_anonymous_account        = '';

# --- Email Configuration ---
$g_phpMailer_method     = PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host            = 'hostname.com';# used with PHPMAILER_METHOD_SMTP
$g_smtp_username        = '';                   # used with PHPMAILER_METHOD_SMTP
$g_smtp_password        = '';                   # used with PHPMAILER_METHOD_SMTP
$g_administrator_email  = 'anymailid@gmail.com';
$g_webmaster_email      = 'webmaster@gmail.com';
$g_from_name            = 'Gecko Bug Tracker';
$g_from_email           = 'anymailid@gmail.com';    # the "From: " field in emails
$g_return_path_email    = 'anymailid@gmail.com';    # the return address for bounced mail
$g_email_receive_own    = OFF;
$g_email_send_using_cronjob = OFF;

# --- Attachments / File Uploads ---
$g_allow_file_upload    = ON;
$g_file_upload_method   = DATABASE; # or DISK
$g_absolute_path_default_upload_folder = ''; # used with DISK, must contain trailing \ or /.
$g_max_file_size        = 5000000;  # in bytes
$g_preview_attachments_inline_max_size = 256 * 1024;
$g_allowed_files        = '';       # extensions comma separated, e.g. 'php,html,java,exe,pl'
$g_disallowed_files     = '';       # extensions comma separated

# --- Branding ---
$g_window_title         = 'Gecko';
$g_logo_image           = 'images/mantis_logo.gif';
$g_favicon_image        = 'images/favicon.ico';

# --- Real names ---
$g_show_realname = OFF;
$g_show_user_realname_threshold = NOBODY;   # Set to access level (e.g. VIEWER, REPORTER, DEVELOPER, MANAGER, etc)

# --- Others ---
$g_default_home_page = 'my_view_page.php';  # Set to name of page to go to after login


$g_enable_profiles = OFF;
$g_allow_no_category = ON;

$g_set_bug_sticky_threshold = NOBODY;
$g_move_bug_threshold = NOBODY;
$g_set_bug_sticky_threshold = NOBODY;`
于 2013-07-29T11:52:49.927 回答