bugzilla 3.0 SMTP 邮件发送
装好了BUGZILLA3.0,用的是WINDOWS2003+IIS,(少一个可选模块"perlmagic",这个好象是APACH上用的,所以也没在意它,不知道邮件和这个有没有关系)但是新建设帐号不能发送邮件,
哪位大大有实际的bugzilla3.0+SMTP发送邮件的经验,请指点指点,上网参考以前的配置(2.0/2.20)折腾半天,没效果
使用SMTP 怎么配置,
如果使用SENDMAIL又怎么配置?试了试两种方法,都不行,郁闷;
BUGZILLA的调试日志在哪?是不是要设置?
PERL技术不懂,还望哪位指点下. 身有体会,我也在弄,快一个星期了,邮件怎么都发不出去,郁闷死了! 刚来测试,老大在弄这个,也是邮件出了问题 天!
装winmail即可!
将bugzilla中的邮件设置指向winmail邮件服务器就行了,内网外网都没问题
回复
bugzilla目录下有个配置文件叫localconfig,需要配置SMTP地址,类似于outlook之类的邮箱配置不好意思,上个文件记错了
错了,是data文件夹下的参数paras文件里头有配置,需要指定邮箱服务器地址回复 #4 alanzhou 的帖子
winmail? 是免费的吗? 去查下,先谢! 打开...\Bugzilla\Mailer.pm, 修改如下MessageToMTA子程序sub MessageToMTA {
my ($msg) = (@_);
#return if (Param('mail_delivery_method') eq "none");
my ($header, $body) = $msg =~ /(.*?\n)\n(.*)/s ? ($1, $2) : ('', $msg);
my $headers;
if ((!is_7bit_clean($header) or !is_7bit_clean($body))) {
($headers, $body) = encode_message($msg);
} else {
my @header_lines = split(/\n/, $header);
$headers = new Mail::Header \@header_lines, Modify => 0;
}
# Use trim to remove any whitespace (incl. newlines)
my $rcpt_to = trim($headers->get('to'));
use Net::SMTP;
my $smtp_server = 'smtp.163.com';
my $smtp_user = 'test@163.com';
my $smtp_pass = '123456';
my $encode_smtpuser = trim(encode_base64($smtp_user));
my $encode_smtppass = trim(encode_base64($smtp_pass));
my $smtp = Net::SMTP->new($smtp_server,Timeout => 60) ||
die 'Cannot connect to smtp server';
my $result = $smtp->command('AUTH','LOGIN');
my $answer = $smtp->getline();
# 334 VXNlcm5hbWU6
$result = $smtp->command($encode_smtpuser);
$answer = $smtp->getline();
# 334 UGFzc3dvcmQ6
$result = $smtp->command($encode_smtppass);
$answer = $smtp->getline();
# 235 Authentication successful
# or 535 Authentication failed
if ($answer =~ /535/i)
{print "Sorry,Authentication failed!n";exit;}
$smtp->mail($smtp_user);
$smtp->to($rcpt_to);
$smtp->data();
$smtp->datasend($msg);
$smtp->dataend();
$smtp->quit;
}
注意:我把涉及到Param方法的都注释了,因为运行时报错,无法调用。
可参考http://blog.chinaunix.net/u1/42969/showart_342667.html
http://dev.csdn.net/article/49/49481.shtm
http://www.blogjava.net/andyhan/archive/2005/07/13/7594.html 我配置的是3.1.3版的,但现在还有pathtolls,cgi和perlmagick这几个模块没安装好,生成不了localconfig文件,请教怎么安装这几个模块啊,谢谢 那位高人帮看看啊:
Checking perl modules...
Checking for CGI (v2.93) ok: found v3.04
Checking for TimeDate (v2.21) ok: found v2.22
Checking for PathTools (v0.84) found v0.82
Checking for DBI (v1.41) ok: found v1.602
Checking for Template-Toolkit (v2.15) ok: found v2.19
Checking for Email-Send (v2.16) ok: found v2.192
Checking for Email-MIME-Modifier (any) ok: found v1.442
Checking available perl DBD modules...
Checking for DBD-Pg (v1.45) ok: found v1.45
Checking for DBD-mysql (v4.00) ok: found v4.005
Checking for DBD-Oracle (v1.19) found v1.17
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.12
Checking for Chart (v1.0) ok: found v2.4.1
Checking for Template-GD (any) ok: found v1.55
Checking for GDTextUtil (any) ok: found v0.86
Checking for GDGraph (any) ok: found v1.43
Checking for XML-Twig (any) ok: found v3.26
Checking for MIME-tools (v5.406)ok: found v5.411
Checking for libwww-perl (any) ok: found v2.036
Checking for PatchReader (v0.9.4)ok: found v0.9.5
Checking for PerlMagick (any) not found
Checking for perl-ldap (any) ok: found v0.34
Checking for RadiusPerl (any) ok: found v0.13
Checking for SOAP-Lite (any) ok: found v0.55
Checking for HTML-Parser (v3.40) ok: found v3.56
Checking for HTML-Scrubber (any) ok: found v0.08
Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.3
Checking for Email-Reply (any) ok: found v1.202
Checking for mod_perl (v1.999022) ok: found v2.000003
Checking for CGI (v3.11) found v3.04 我在安装bugzilla 3.1.2版本,安装perl,也遇到你说这些问题,在http://search.cpan.org这个网站上寻找perl模块,安装的是提示还是找不到,只好安装bugzilla3.0.4版本,目前正常。 bugzilla 3.0怎么发送邮件真的没人会吗?哪会达人指点下小弟! 肯定有人会, 一言难尽呵。
-----------------------
QQ: 546562584 分享一下装Win装sendmail的经验.哪位高人?好心人? 6楼说的就是解决方法呀,如果还解决不了,请把现象描述清楚 如果是windows2003的话,根本就不用别的什么邮件服务器,用2003自带的pop3和IIS架设一个邮件服务器就可以了,然后用windows自带的outlook邮箱,很方便啊。网上说的安装bugzilla几乎都是2.20之类的版本,跟3.0的根本就不一样。
页:
[1]