Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
485
Issues
485
List
Boards
Labels
Service Desk
Milestones
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISPConfig
ISPConfig 3
Commits
5a86c344
Commit
5a86c344
authored
Apr 24, 2017
by
Marius Burkard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed mail content-type / charset and boundary problem
parent
2c76595c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
16 deletions
+8
-16
interface/lib/classes/ispcmail.inc.php
interface/lib/classes/ispcmail.inc.php
+4
-8
server/lib/classes/ispcmail.inc.php
server/lib/classes/ispcmail.inc.php
+4
-8
No files found.
interface/lib/classes/ispcmail.inc.php
View file @
5a86c344
...
...
@@ -433,20 +433,17 @@ class ispcmail {
$textonly
=
true
;
}
elseif
(
$text
==
true
&&
$html
==
false
&&
$attach
==
true
)
{
// text and attachment
$content_type
=
'multipart/mixed;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/mixed; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
elseif
(
$html
==
true
&&
$text
==
true
&&
$attach
==
false
)
{
// html only (or text too)
$content_type
=
'multipart/alternative;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/alternative; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
elseif
(
$html
==
true
&&
$text
==
false
&&
$attach
==
false
)
{
// html only (or text too)
$content_type
=
'text/html; charset="'
.
strtolower
(
$this
->
mail_charset
)
.
'"'
;
$htmlonly
=
true
;
}
elseif
(
$html
==
true
&&
$attach
==
true
)
{
// html and attachments
$content_type
=
'multipart/mixed;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/mixed; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
$this
->
headers
[
'Content-Type'
]
=
$content_type
;
...
...
@@ -475,8 +472,7 @@ class ispcmail {
if
(
$attach
)
{
foreach
(
$this
->
attachments
as
$att
)
{
$this
->
body
.
=
"--
{
$this
->
mime_boundary
}
\n
"
.
"Content-Type: "
.
$att
[
'type'
]
.
";
\n
"
.
" name=
\"
"
.
$att
[
'filename'
]
.
"
\"\n
"
.
"Content-Type: "
.
$att
[
'type'
]
.
"; name=
\"
"
.
$att
[
'filename'
]
.
"
\"\n
"
.
"Content-Transfer-Encoding: base64
\n
"
.
"Content-Disposition: attachment;
\n\n
"
.
chunk_split
(
base64_encode
(
$att
[
'content'
]))
.
"
\n\n
"
;
...
...
server/lib/classes/ispcmail.inc.php
View file @
5a86c344
...
...
@@ -433,20 +433,17 @@ class ispcmail {
$textonly
=
true
;
}
elseif
(
$text
==
true
&&
$html
==
false
&&
$attach
==
true
)
{
// text and attachment
$content_type
=
'multipart/mixed;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/mixed; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
elseif
(
$html
==
true
&&
$text
==
true
&&
$attach
==
false
)
{
// html only (or text too)
$content_type
=
'multipart/alternative;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/alternative; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
elseif
(
$html
==
true
&&
$text
==
false
&&
$attach
==
false
)
{
// html only (or text too)
$content_type
=
'text/html; charset="'
.
strtolower
(
$this
->
mail_charset
)
.
'"'
;
$htmlonly
=
true
;
}
elseif
(
$html
==
true
&&
$attach
==
true
)
{
// html and attachments
$content_type
=
'multipart/mixed;'
;
$content_type
.
=
"
\n
"
.
' boundary="'
.
$this
->
mime_boundary
.
'"'
;
$content_type
=
'multipart/mixed; boundary="'
.
$this
->
mime_boundary
.
'"'
;
}
$this
->
headers
[
'Content-Type'
]
=
$content_type
;
...
...
@@ -475,8 +472,7 @@ class ispcmail {
if
(
$attach
)
{
foreach
(
$this
->
attachments
as
$att
)
{
$this
->
body
.
=
"--
{
$this
->
mime_boundary
}
\n
"
.
"Content-Type: "
.
$att
[
'type'
]
.
";
\n
"
.
" name=
\"
"
.
$att
[
'filename'
]
.
"
\"\n
"
.
"Content-Type: "
.
$att
[
'type'
]
.
"; name=
\"
"
.
$att
[
'filename'
]
.
"
\"\n
"
.
"Content-Transfer-Encoding: base64
\n
"
.
"Content-Disposition: attachment;
\n\n
"
.
chunk_split
(
base64_encode
(
$att
[
'content'
]))
.
"
\n\n
"
;
...
...
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