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
a5d2579b
Commit
a5d2579b
authored
Nov 03, 2005
by
wurblzap%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugzilla Bug 306207: sendmail support under Windows bypasses message encoding
Patch by byron jones (glob) <bugzilla@glob.com.au> r=wurblzap, a=myk
parent
4adfa913
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
BugMail.pm
Bugzilla/BugMail.pm
+13
-11
No files found.
Bugzilla/BugMail.pm
View file @
a5d2579b
...
...
@@ -630,10 +630,22 @@ 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
(
Param
(
'utf8'
)
and
(
!
is_7bit_clean
(
$header
)
or
!
is_7bit_clean
(
$body
)))
{
(
$headers
,
$body
)
=
encode_message
(
$header
,
$body
);
}
else
{
my
@header_lines
=
split
(
/\n/
,
$header
);
$headers
=
new
Mail::
Header
\
@header_lines
,
Modify
=>
0
;
}
if
(
Param
(
"mail_delivery_method"
)
eq
"sendmail"
&&
$^O
=~
/MSWin32/i
)
{
open
(
SENDMAIL
,
'|'
.
SENDMAIL_EXE
.
' -t -i'
)
||
die
"Failed to execute "
.
SENDMAIL_EXE
.
": $!\n"
;
print
SENDMAIL
$msg
;
print
SENDMAIL
$headers
->
as_string
;
print
SENDMAIL
"\n"
;
print
SENDMAIL
$body
;
close
SENDMAIL
;
return
;
}
...
...
@@ -650,16 +662,6 @@ sub MessageToMTA {
$
Mail::Mailer::testfile::
config
{
outfile
}
=
"$datadir/mailer.testfile"
;
}
my
(
$header
,
$body
)
=
$msg
=~
/(.*?\n)\n(.*)/s
?
(
$1
,
$2
)
:
(
''
,
$msg
);
my
$headers
;
if
(
Param
(
'utf8'
)
and
(
!
is_7bit_clean
(
$header
)
or
!
is_7bit_clean
(
$body
)))
{
(
$headers
,
$body
)
=
encode_message
(
$header
,
$body
);
}
else
{
my
@header_lines
=
split
(
/\n/
,
$header
);
$headers
=
new
Mail::
Header
\
@header_lines
,
Modify
=>
0
;
}
$mailer
->
open
(
$headers
->
header_hashref
);
print
$mailer
$body
;
$mailer
->
close
;
...
...
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