Mantis XAMPP电子邮件配置

时间:2013-03-07 02:40:10

标签: xampp mantis

我在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';
     ?>

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

Password reset for email = User email id here
2013-03-07 13:31 EST mail Processing 27 queued messages
2013-03-07 13:31 EST mail Sending message #52 queued on 2013-03-07 13:31 EST
2013-03-07 13:31 EST mail Sending message #51 queued on 2013-03-07 13:20 EST
2013-03-07 13:31 EST mail Sending message #50 queued on 2013-03-07 13:13 EST
2013-03-07 13:31 EST mail Sending message #49 queued on 2013-03-07 13:04 EST
2013-03-07 13:31 EST mail Sending message #48 queued on 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。它工作正常。

1 个答案:

答案 0 :(得分: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;`