Skip to content

Commit

Permalink
Merge branch 'release/3.14.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fedelemantuano committed Nov 24, 2020
2 parents 9b3f638 + 3e985be commit 9791b2d
Show file tree
Hide file tree
Showing 4 changed files with 5,707 additions and 1 deletion.
9 changes: 9 additions & 0 deletions mailparser/mailparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"""

from __future__ import unicode_literals
import base64
import email
import logging
import os
Expand Down Expand Up @@ -383,6 +384,14 @@ def parse(self):
binary = True
log.debug("Filename {!r} part {!r} is binary".format(
filename, i))
elif "uuencode" in transfer_encoding:
# Re-encode in base64
payload = base64.b64encode(
p.get_payload(decode=True)).decode('ascii')
binary = True
transfer_encoding = "base64"
log.debug("Filename {!r} part {!r} is binary (uuencode"
" re-encoded to base64)".format(filename, i))
else:
payload = ported_string(
p.get_payload(decode=True), encoding=charset)
Expand Down
2 changes: 1 addition & 1 deletion mailparser/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
limitations under the License.
"""

__version__ = "3.13.0"
__version__ = "3.14.0"

if __name__ == "__main__":
print(__version__)
Loading

0 comments on commit 9791b2d

Please sign in to comment.