Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
8957abe1
Commit
8957abe1
authored
7 years ago
by
Pegane Nestor
Browse files
Options
Downloads
Patches
Plain Diff
FIX #6354 removed encodeHeader call
parent
67b8bc86
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/maarch_entreprise/tools/mails/htmlMimeMail.php
+15
-11
15 additions, 11 deletions
apps/maarch_entreprise/tools/mails/htmlMimeMail.php
with
15 additions
and
11 deletions
apps/maarch_entreprise/tools/mails/htmlMimeMail.php
+
15
−
11
View file @
8957abe1
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
* along with htmlMimeMail; if not, write to the Free Software
* along with htmlMimeMail; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* © Copyright 2004 Richard Heyes
*
�
Copyright 2004 Richard Heyes
*/
*/
require_once
(
dirname
(
__FILE__
)
.
'/mimePart.php'
);
require_once
(
dirname
(
__FILE__
)
.
'/mimePart.php'
);
...
@@ -710,17 +710,19 @@ class htmlMimeMail
...
@@ -710,17 +710,19 @@ class htmlMimeMail
case
'mail'
:
case
'mail'
:
$subject
=
''
;
$subject
=
''
;
if
(
!
empty
(
$this
->
headers
[
'Subject'
]))
{
if
(
!
empty
(
$this
->
headers
[
'Subject'
]))
{
$subject
=
$this
->
_encodeHeader
(
$this
->
headers
[
'Subject'
],
$this
->
build_params
[
'head_charset'
]);
//subject = $this->_encodeHeader($this->header['Subject'], $this->build_params['head_charset']);
$subject
=
$this
->
headers
[
'Subject'
];
unset
(
$this
->
headers
[
'Subject'
]);
unset
(
$this
->
headers
[
'Subject'
]);
}
}
// Get flat representation of headers
// Get flat representation of headers
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
$headers
[]
=
$name
.
': '
.
$this
->
_encodeHeader
(
$value
,
$this
->
build_params
[
'head_charset'
]);
//$headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
$headers
[]
=
$name
.
': '
.
$value
;
}
}
$to
=
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
),
$this
->
build_params
[
'head_charset'
]);
//
$to = $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
$to
=
implode
(
', '
,
$recipients
);
if
(
!
empty
(
$this
->
return_path
))
{
if
(
!
empty
(
$this
->
return_path
))
{
$result
=
mail
(
$to
,
$subject
,
$this
->
output
,
implode
(
CRLF
,
$headers
),
'-f'
.
$this
->
return_path
);
$result
=
mail
(
$to
,
$subject
,
$this
->
output
,
implode
(
CRLF
,
$headers
),
'-f'
.
$this
->
return_path
);
}
else
{
}
else
{
...
@@ -739,11 +741,13 @@ class htmlMimeMail
...
@@ -739,11 +741,13 @@ class htmlMimeMail
case
'sendmail'
:
case
'sendmail'
:
// Get flat representation of headers
// Get flat representation of headers
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
$headers
[]
=
$name
.
': '
.
$this
->
_encodeHeader
(
$value
,
$this
->
build_params
[
'head_charset'
]);
//$headers[] = $name . ': ' . $this->_encodeHeader($value, $this->build_params['head_charset']);
$headers
[]
=
$name
.
': '
.
$value
;
}
}
// Encode To:
// Encode To:
$headers
[]
=
'To: '
.
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
),
$this
->
build_params
[
'head_charset'
]);
//$headers[] = 'To: ' . $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
$headers
[]
=
'To: '
.
implode
(
', '
,
$recipients
);
// Get return path arg for sendmail command if necessary
// Get return path arg for sendmail command if necessary
$returnPath
=
''
;
$returnPath
=
''
;
...
@@ -794,17 +798,17 @@ class htmlMimeMail
...
@@ -794,17 +798,17 @@ class htmlMimeMail
if
(
$name
==
'Bcc'
)
{
if
(
$name
==
'Bcc'
)
{
continue
;
continue
;
}
}
//ajout d'une condition pour subject, car _encodeHeader ne prend pas les caractères spéciaux avec php7 en revanche fonctionne très bien avec php5.6
//ajout d'une condition pour subject, car _encodeHeader ne prend pas les caract
�
res sp
�
ciaux avec php7 en revanche fonctionne tr
�
s bien avec php5.6
if
(
$name
==
'Subject'
){
if
(
$name
==
'Subject'
){
$headers
[]
=
$name
.
': '
.
$value
;
$headers
[]
=
$name
.
': '
.
$value
;
}
else
{
}
else
{
$headers
[]
=
$name
.
': '
.
$
this
->
_encodeHeader
(
$value
,
$this
->
build_params
[
'head_charset'
])
;
$headers
[]
=
$name
.
': '
.
$
value
;
}
}
}
}
// Add To header based on $recipients argument
// Add To header based on $recipients argument
$headers
[]
=
'To: '
.
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
),
$this
->
build_params
[
'head_charset'
]);
//
$headers[] = 'To: ' . $this->_encodeHeader(implode(', ', $recipients), $this->build_params['head_charset']);
$headers
[]
=
'To: '
.
implode
(
', '
,
$recipients
);
// Add headers to send_params
// Add headers to send_params
$send_params
[
'headers'
]
=
$headers
;
$send_params
[
'headers'
]
=
$headers
;
$send_params
[
'recipients'
]
=
array_values
(
array_unique
(
$smtp_recipients
));
$send_params
[
'recipients'
]
=
array_values
(
array_unique
(
$smtp_recipients
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment