Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
d652763b
Commit
d652763b
authored
Feb 02, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 277437 : Use Mail::Mailer (Perl module) for mail delivery
Patch by Andrei Benea <abenea@gmail.com> r=vladd a=justdave
parent
5bf56155
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
13 deletions
+43
-13
BugMail.pm
Bugzilla/BugMail.pm
+19
-12
checksetup.pl
checksetup.pl
+6
-1
defparams.pl
defparams.pl
+18
-0
No files found.
Bugzilla/BugMail.pm
View file @
d652763b
...
...
@@ -35,6 +35,9 @@ use Bugzilla::RelationSet;
use
Bugzilla::
Config
qw(:DEFAULT $datadir)
;
use
Bugzilla::
Util
;
use
Mail::
Mailer
;
use
Mail::
Header
;
# This code is really ugly. It was a commandline interface, then it was moved
# There are package-global variables which we rely on ProcessOneBug to clean
# up each time, and other sorts of fun.
...
...
@@ -877,23 +880,27 @@ sub NewProcessOnePerson ($$$$$$$$$$$$$) {
return
1
;
}
# XXX: Should eventually add $mail_from and $mail_to options to
# control the SMTP Envelope. -mkanat
sub
MessageToMTA
($)
{
my
(
$msg
)
=
(
@_
);
my
(
$msg
)
=
(
@_
);
return
unless
$enableSendMail
;
my
$sendmailparam
=
""
;
unless
(
Param
(
"sendmailnow"
))
{
$sendmailparam
=
"-ODeliveryMode=deferred"
;
my
@args
;
if
(
Param
(
"maildeliverymethod"
)
eq
"sendmail"
&&
Param
(
"sendmailnow"
))
{
push
@args
,
"-ODeliveryMode=deferred"
;
}
if
(
Param
(
"maildeliverymethod"
)
eq
"smtp"
)
{
push
@args
,
Server
=>
Param
(
"smtpserver"
);
}
my
$mailer
=
new
Mail::
Mailer
Param
(
"maildeliverymethod"
),
@args
;
if
(
$enableSendMail
==
1
)
{
open
(
SENDMAIL
,
"|/usr/lib/sendmail $sendmailparam -t -i"
)
||
die
"Can't open sendmail"
;
$msg
=~
/(.*?)\n\n(.*)/ms
;
my
@header_lines
=
split
(
/\n/
,
$1
);
my
$body
=
$2
;
print
SENDMAIL
trim
(
$msg
)
.
"\n"
;
close
SENDMAIL
;
}
my
$headers
=
new
Mail::
Header
\
@header_lines
,
Modify
=>
0
;
$mailer
->
open
(
$headers
->
header_hashref
);
print
$mailer
$msg
;
$mailer
->
close
;
}
1
;
checksetup.pl
View file @
d652763b
...
...
@@ -302,7 +302,11 @@ my $modules = [
{
name
=>
'Text::Wrap'
,
version
=>
'2001.0131'
}
},
{
name
=>
'Mail::Mailer'
,
version
=>
'1.65'
},
];
my
%
ppm_modules
=
(
...
...
@@ -318,6 +322,7 @@ my %ppm_modules = (
'GD'
=>
'GD'
,
'GD::Graph'
=>
'GDGraph'
,
'GD::Text::Align'
=>
'GDTextUtil'
,
'Mail::Mailer'
=>
'MailTools'
,
);
sub
install_command
{
...
...
defparams.pl
View file @
d652763b
...
...
@@ -671,6 +671,17 @@ sub find_languages {
},
{
name
=>
'maildeliverymethod'
,
desc
=>
'The method used for mail delivery. The testfile method '
.
'is useful for debugging (for more information see the '
.
'Mail::Mailer manual)'
,
type
=>
's'
,
choices
=>
[
'sendmail'
,
'smtp'
,
'qmail'
,
'testfile'
],
default
=>
'sendmail'
,
checker
=>
\&
check_multi
},
{
name
=>
'sendmailnow'
,
desc
=>
'Sites using anything older than version 8.12 of \'sendmail\' '
.
'can achieve a significant performance increase in the '
.
...
...
@@ -684,6 +695,13 @@ sub find_languages {
},
{
name
=>
'smtpserver'
,
desc
=>
'The SMTP server address (if using SMTP for mail delivery).'
,
type
=>
't'
,
default
=>
'localhost'
},
{
name
=>
'passwordmail'
,
desc
=>
'The email that gets sent to people to tell them their password.'
.
'Within this text, %mailaddress% gets replaced by the person\'s '
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment