summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-02-26 09:54:20 -0800
committerDylan Baker <dylan@pnwbakers.com>2018-03-01 10:34:56 -0800
commit427fef2fdb4a13efd940e4ce2877332eeacb31e2 (patch)
treeab12484a2fac8220c9d81c9c463481e5cd1c411e
parent39c952b21612d24418e482568e1e9c8b373f721a (diff)
fix sending signed messages with py3k
-rw-r--r--alot/db/envelope.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/db/envelope.py b/alot/db/envelope.py
index df13e7bd..a539414a 100644
--- a/alot/db/envelope.py
+++ b/alot/db/envelope.py
@@ -186,7 +186,7 @@ class Envelope(object):
inner_msg = textpart
if self.sign:
- plaintext = helper.email_as_string(inner_msg)
+ plaintext = helper.email_as_bytes(inner_msg)
logging.debug('signing plaintext: %s', plaintext)
try:
@@ -216,7 +216,7 @@ class Envelope(object):
# wrap signature in MIMEcontainter
stype = 'pgp-signature; name="signature.asc"'
- signature_mime = MIMEApplication(_data=signature_str,
+ signature_mime = MIMEApplication(_data=signature_str.decode('ascii'),
_subtype=stype,
_encoder=encode_7or8bit)
signature_mime['Content-Description'] = 'signature'