New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with encoding in mailer responder #416

nadouani opened this Issue Feb 5, 2019 · 0 comments


None yet
1 participant
Copy link

nadouani commented Feb 5, 2019

Request Type


Work Environment

Question Answer
Cortex version / git hash 2.1.2
Package Type Docker thehiveproject/thehive:latest

Problem Description

Steps to Reproduce

  1. Create case with russian letters in Title or description in TheHive
  2. launch Mailer Responder from case menu
  3. Cortex shows following error for mailer responder
Invalid output
Traceback (most recent call last):
  File "Mailer/", line 59, in <module>
  File "Mailer/", line 47, in run
    msg.attach(MIMEText(description, 'plain'))
  File "/usr/lib/python2.7/email/mime/", line 30, in __init__
    self.set_payload(_text, _charset)
  File "/usr/lib/python2.7/email/", line 226, in set_payload
  File "/usr/lib/python2.7/email/", line 262, in set_charset
    self._payload = self._payload.encode(charset.output_charset)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)

Possible Solutions

in do encode('utf-8') of title and description

title = self.get_param('data.title', None, 'title is missing')
description = self.get_param('data.description', None, 'description is missing')

Thanks to @bsploit for the issue and solution

@nadouani nadouani added the bug label Feb 5, 2019

@nadouani nadouani added this to the 1.15.2 milestone Feb 6, 2019

nadouani added a commit that referenced this issue Feb 6, 2019

@nadouani nadouani closed this Feb 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment