Skip to content

Commit

Permalink
#416 Fix title and description encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Feb 6, 2019
1 parent 905f509 commit 9f9ee97
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions responders/Mailer/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@
class Mailer(Responder):
def __init__(self):
Responder.__init__(self)
self.smtp_host = self.get_param(
'config.smtp_host', 'localhost')
self.smtp_port = self.get_param(
'config.smtp_port', '25')
self.mail_from = self.get_param(
'config.from', None, 'Missing sender email address')
self.smtp_host = self.get_param('config.smtp_host', 'localhost')
self.smtp_port = self.get_param('config.smtp_port', '25')
self.mail_from = self.get_param('config.from', None, 'Missing sender email address')

def run(self):
Responder.run(self)

title = self.get_param('data.title', None, 'title is missing')
title = title.encode('utf-8')

description = self.get_param('data.description', None, 'description is missing')
description = description.encode('utf-8')

mail_to = None
if self.data_type == 'thehive:case':
# Search recipient address in tags
Expand Down

0 comments on commit 9f9ee97

Please sign in to comment.