Use replace header instead of add header to avoid header duplication.
This commit is contained in:
parent
8b5eda4240
commit
8a16ef040f
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ def encrypt_payload( payload, gpg_to_cmdline ):
|
|||
payload.set_payload( "\n".join( filter( lambda x:re.search(r'^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$',x), payload.get_payload().split("\n") ) ) )
|
||||
|
||||
if payload.get('Content-Transfer-Encoding') is not None:
|
||||
payload['Content-Transfer-Encoding'] = "quoted-printable"
|
||||
payload.replace_header( 'Content-Transfer-Encoding', "quoted-printable" )
|
||||
|
||||
return payload
|
||||
|
||||
|
|
Loading…
Reference in a new issue