aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-26 15:22:24 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-26 15:22:24 +0200
commit10eb602ac437e2c56cc8347050ac5c17d186e868 (patch)
tree15f75292980c2475a02eca56e1d96df066df9bb4
parent1dbc518199e35d7da9dcbcc9004aef045aedfc86 (diff)
downloadMail-10eb602ac437e2c56cc8347050ac5c17d186e868.zip
Mail-10eb602ac437e2c56cc8347050ac5c17d186e868.tar.gz
Mail-10eb602ac437e2c56cc8347050ac5c17d186e868.tar.bz2
Use the Base64 encoder.
-rw-r--r--Content/Attachment.php2
-rw-r--r--Content/Content.php8
2 files changed, 2 insertions, 8 deletions
diff --git a/Content/Attachment.php b/Content/Attachment.php
index 022ce84..da0783f 100644
--- a/Content/Attachment.php
+++ b/Content/Attachment.php
@@ -142,6 +142,6 @@ class Attachment extends Content
*/
protected function _getContent()
{
- return base64_encode($this->getStream()->readAll());
+ return Encoder\Base64::encode($this->getStream()->readAll());
}
}
diff --git a/Content/Content.php b/Content/Content.php
index 4cf2180..c9d2947 100644
--- a/Content/Content.php
+++ b/Content/Content.php
@@ -176,13 +176,7 @@ abstract class Content implements \ArrayAccess
$out .= static::formatHeaders($this->getHeaders()) . CRLF;
}
- $content = $this->_getContent();
-
- if ('base64' === $this['content-transfer-encoding']) {
- $content = trim(chunk_split($content, 76, CRLF));
- }
-
- $out .= $content;
+ $out .= $this->_getContent();
return $out;
}