mantis邮件乱码问题
在提交的问题状态发生改变时,mantis系统会发送邮件给相关人员,但是邮件的内容,有时完全没问题,有时邮件中却会充满乱码,不知道这是怎么一回事。郁闷的是,同一个项目,先前一封邮件还OK,下一个邮件就乱码了。
更郁闷的是,拿管理员的邮箱去注册一个新账号后,收到两个邮件,一个是提示管理员,一个是注册邮件,俩邮件,一个OK,一个乱码。。。
汗~~~~~~:Q :Q :L
请达人帮忙解惑,为什么会这样呢? .检查你的用户设置中的“界面语言”和“发送问题注释 Email 发送限制”项 界面语言为chinese_simplified_gb2312
发送问题注释Email发送限制为0
以下为mantis中配置文件 config_defaults_inc中语言和Email设置项内容
################################
# Mantis Language Settings
################################
# --- language settings -----------
# If the language is set to 'auto', the actual
# language is determined by the user agent (web browser)
# language preference.
$g_default_language = 'chinese_simplified_gb2312';
# list the choices that the users are allowed to choose
$g_language_choices_arr = array(
'auto',
'chinese_simplified_gb2312',
'english',
);
# Browser language mapping for 'auto' language selection
$g_language_auto_map = array(
'zh-cn, zh-sg, zh' =>'chinese_simplified_gb2312',
'en-us, en-gb, en-au, en' => 'english',
);
# Fallback for automatic language selection
$g_fallback_language = 'english';
#############################
# Mantis Email Settings
#############################
# --- email variables -------------
$g_administrator_email = 'xxx@xxxxx.com';
$g_webmaster_email = 'xxx@xxxxx.com';
# the sender email, part of 'From: ' header in emails
$g_from_email = 'xxx@xxxxx.com';
# the sender name, part of 'From: ' header in emails
$g_from_name = 'Mantis Bug Tracker';
# the return address for bounced mail
$g_return_path_email = 'xxx@xxxxx.com';
# allow email notification
#note that if this is disabled, sign-up and password reset messages will
#not be sent.
$g_enable_email_notification = ON;
# The following two config options allow you to control who should get email
# notifications on different actions/statuses.The first option (default_notify_flags)
# sets the default values for different user categories.The user categories
# are:
#
# 'reporter': the reporter of the bug
# 'handler': the handler of the bug
# 'monitor': users who are monitoring a bug
# 'bugnotes': users who have added a bugnote to the bug
# 'threshold_max': all users with access <= max
# 'threshold_min': ..and with access >= min
#
# The second config option (notify_flags) sets overrides for specific actions/statuses.
# If a user category is not listed for an action, the default from the config
# option above is used.The possible actions are:
#
# 'new': a new bug has been added
# 'owner': a bug has been assigned to a new owner
# 'reopened': a bug has been reopened
# 'deleted': a bug has been deleted
# 'updated': a bug has been updated
# 'bugnote': a bugnote has been added to a bug
# 'sponsor': sponsorship has changed on this bug
# 'relation': a relationship has changed on this bug
# '<status>': eg: 'resolved', 'closed', 'feedback', 'acknowledged', ...etc.
# this list corresponds to $g_status_enum_string
#
# If you wanted to have all developers get notified of new bugs you might add
# the following lines to your config file:
#
# $g_notify_flags['new']['threshold_min'] = DEVELOPER;
# $g_notify_flags['new']['threshold_max'] = DEVELOPER;
#
# You might want to do something similar so all managers are notified when a
# bug is closed.If you didn't want reporters to be notified when a bug is
# closed (only when it is resolved) you would use:
#
# $g_notify_flags['closed']['reporter'] = OFF;
$g_default_notify_flags = array('reporter' => ON,
'handler' => ON,
'monitor' => ON,
'bugnotes' => ON,
'threshold_min' => NOBODY,
'threshold_max' => NOBODY);
# We don't need to send these notifications on new bugs
# (see above for info on this config option)
#@@@ (though I'm not sure they need to be turned off anymore
# - there just won't be anyone in those categories)
# I guess it serves as an example and a placeholder for this
# config option
$g_notify_flags['new'] = array('bugnotes' => OFF,
'monitor' => OFF);
# Whether user's should receive emails for their own actions
$g_email_receive_own = OFF;
# set to OFF to disable email check
$g_validate_email = ( substr( php_uname(), 0, 7 ) == 'Windows' ) ? OFF : ON;
$g_check_mx_record = OFF; # Not supported under Windows.
# if ON, allow the user to omit an email field
# note if you allow users to create their own accounts, they
#must specify an email at that point, no matter what the value
#of this option is.Otherwise they wouldn't get their passwords.
$g_allow_blank_email = OFF;
# Only allow and send email to addresses in the given domain
# For example:
# $g_limit_email_domain = 'users.sourceforge.net';
$g_limit_email_domain = OFF;
# This specifies the access level that is needed to get the mailto: links.
$g_show_user_email_threshold = NOBODY;
# If use_x_priority is set to ON, what should the value be?
# Urgent = 1, Not Urgent = 5, Disable = 0
# Note: some MTAs interpret X-Priority = 0 to mean 'Very Urgent'
$g_mail_priority = 3;
# select the method to mail by:
# 0 - mail()
# 1 - sendmail
# 2 - SMTP
$g_phpMailer_method = 2;
# This option allows you to use a remote SMTP host.Must use the phpMailer script
# One or more hosts, separated by a semicolon, can be listed.
# You can also specify a different port for each host by using this
# format: (e.g. "smtp1.example.com:25;smtp2.example.com").
# Hosts will be tried in order.
$g_smtp_host = 'mail.xxxxx.com:25';
# These options allow you to use SMTP Authentication when you use a remote
# SMTP host with phpMailer.If smtp_username is not '' then the username
# and password will be used when logging in to the SMTP server.
$g_smtp_username = 'XXXXXX';
$g_smtp_password = 'XXXXXX';
# It is recommended to use a cronjob or a scheduler task to send emails.
# The cronjob should typically run every 5 minutes.If no cronjob is used,
# then user will have to wait for emails to be sent after performing an action
# which triggers notifications.This slows user performance.
$g_email_send_using_cronjob = OFF;
# Specify whether e-mails should be sent with the category set or not.This is tested
# with Microsoft Outlook.More testing for this feature + other formats will be added
# in the future.
# OFF, EMAIL_CATEGORY_PROJECT_CATEGORY (format: Category)
$g_email_set_category = OFF;
# --- email separator and padding ------------
$g_email_separator1 = str_pad('', 70, '=');
$g_email_separator2 = str_pad('', 70, '-');
$g_email_padding_length = 28;
[ 本帖最后由 dj02304 于 2009-4-7 15:02 编辑 ] 乱码问题还是存在,唉~ 你使用的是什么邮件服务器?换个试试 首先,你需要确定什么样的邮件是乱码,找到规律,这样才能快速找到问题所在。 恩,规律不好找。
我现在使用了三个账户,分别使用
公司邮箱----开发权限
163邮箱----报告权限
126邮箱----经理权限
三个用户同时加到一个项目中,当该项目中BUG发生变化时系统发邮件给三个用户,此时,有可能出现的情况有:
1、全部用户接收的邮件字体正常。
2、公司邮箱接收正常,126、163邮箱中,在收件箱的邮件列表中看到邮件名称: 涓烘祴璇曢偖浠系统而建立,但是打开该邮件之后,邮件标题显示为:为测试邮件系统而建立,该名称正确,且邮件内容正常。
3、与2为之相反,126、163邮箱中,在收件箱的邮件列表中看到邮件名称正常,但是打开邮件后发现邮件标题和邮件内容全部乱码。
4、三个邮箱全部出现乱码问题。有时会出现三个邮箱的邮件全部乱码问题,即邮件标题和邮件内容全部都是乱码,如图 邮件中有一个 Header 叫 Content-Type,请看以下例子: Content-Type: text/plain; charset="gb2312" 如果没有charset,就默认为 ISO-8859-1。在这种情形,如果邮件内容是中文,就会出现乱码的现象。 当然,如果 charset="UTF-8", 但邮件本身用 gb2312,同样也会出现乱码。
详情:http://www.websina.com/cn/bug-tracking-email.html 系统默认语言是
$g_default_language = 'chinese_simplified';
而chinese_simplified 中显示为UTF-8,
$s_charset = 'utf-8';
在配置文件的邮件设置中没有找到您说的有一个 Header 叫 Content-Type,您能再详细说一下么? 回复 8# bill_hen
这个是在哪个配置文件中的呀,求高手指点
页:
[1]