Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Maarch
MaarchCourrier
Commits
d57cd254
Commit
d57cd254
authored
Nov 22, 2017
by
Pegane Nestor
Browse files
FEAT #6354
parent
5dd98840
Changes
1
Hide whitespace changes
Inline
Side-by-side
apps/maarch_entreprise/tools/mails/htmlMimeMail.php
View file @
d57cd254
...
...
@@ -16,7 +16,7 @@
* along with htmlMimeMail; if not, write to the Free Software
* 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'
);
...
...
@@ -710,16 +710,16 @@ class htmlMimeMail
case
'mail'
:
$subject
=
''
;
if
(
!
empty
(
$this
->
headers
[
'Subject'
]))
{
$subject
=
$this
->
_encodeHeader
(
$this
->
headers
[
'Subject'
],
$this
->
build_params
[
'head_charset'
])
;
$subject
=
$this
->
headers
[
'Subject'
]
;
unset
(
$this
->
headers
[
'Subject'
]);
}
// Get flat representation of headers
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
$headers
[]
=
$name
.
': '
.
$
this
->
_encodeHeader
(
$value
,
$this
->
build_params
[
'head_charset'
])
;
$headers
[]
=
$name
.
': '
.
$
value
;
}
$to
=
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
)
,
$this
->
build_params
[
'head_charset'
])
;
$to
=
implode
(
', '
,
$recipients
);
if
(
!
empty
(
$this
->
return_path
))
{
$result
=
mail
(
$to
,
$subject
,
$this
->
output
,
implode
(
CRLF
,
$headers
),
'-f'
.
$this
->
return_path
);
...
...
@@ -739,11 +739,11 @@ class htmlMimeMail
case
'sendmail'
:
// Get flat representation of headers
foreach
(
$this
->
headers
as
$name
=>
$value
)
{
$headers
[]
=
$name
.
': '
.
$
this
->
_encodeHeader
(
$value
,
$this
->
build_params
[
'head_charset'
])
;
$headers
[]
=
$name
.
': '
.
$
value
;
}
// Encode To:
$headers
[]
=
'To: '
.
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
)
,
$this
->
build_params
[
'head_charset'
])
;
$headers
[]
=
'To: '
.
implode
(
', '
,
$recipients
);
// Get return path arg for sendmail command if necessary
$returnPath
=
''
;
...
...
@@ -794,7 +794,7 @@ class htmlMimeMail
if
(
$name
==
'Bcc'
)
{
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'
){
$headers
[]
=
$name
.
': '
.
$value
;
}
else
{
...
...
@@ -803,7 +803,7 @@ class htmlMimeMail
}
// Add To header based on $recipients argument
$headers
[]
=
'To: '
.
$this
->
_encodeHeader
(
implode
(
', '
,
$recipients
)
,
$this
->
build_params
[
'head_charset'
])
;
$headers
[]
=
'To: '
.
implode
(
', '
,
$recipients
);
// Add headers to send_params
$send_params
[
'headers'
]
=
$headers
;
...
...
Write
Preview
Supports
Markdown
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