[#7096] Convert email msg to unicode before saving to mongo
Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>
diff --git a/Allura/allura/command/smtp_server.py b/Allura/allura/command/smtp_server.py
index a055d8a..eb2a98f 100644
--- a/Allura/allura/command/smtp_server.py
+++ b/Allura/allura/command/smtp_server.py
@@ -24,6 +24,7 @@
import allura.tasks
from allura.command import base
+from allura.lib import helpers as h
from paste.deploy.converters import asint
@@ -54,7 +55,8 @@
base.log.info('Msg Received from %s for %s', mailfrom, rcpttos)
base.log.info(' (%d bytes)', len(data))
allura.tasks.mail_tasks.route_email.post(
- peer=peer, mailfrom=mailfrom, rcpttos=rcpttos, data=data)
+ peer=peer, mailfrom=mailfrom, rcpttos=rcpttos,
+ data=h.really_unicode(data))
base.log.info('Msg passed along')
except Exception:
base.log.exception('Error handling msg')