remove newlines from email attachments as cannot be handled
This commit is contained in:
parent
28b38d45e7
commit
fdb8a1a763
1 changed files with 1 additions and 0 deletions
|
|
@ -386,6 +386,7 @@ class Email:
|
|||
fname = part.get_filename()
|
||||
if fname:
|
||||
try:
|
||||
fname = fname.replace('\n', ' ').replace('\r', '')
|
||||
fname = cstr(decode_header(fname)[0][0])
|
||||
except:
|
||||
fname = get_random_filename(content_type=content_type)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue