fix: Use new digest format

pull/14/head
Raphaël Vinot 2019-01-15 17:22:15 +01:00
parent 0ccd535f3d
commit 7b1eb10e6a
1 changed files with 3 additions and 3 deletions

View File

@ -305,15 +305,15 @@ def create_app(configfile=None):
def send(url, ip='', autosend=False):
if not urlabuse_query.get_mail_sent(url):
data = urlabuse_query.cached(url)
data = urlabuse_query.cached(url, digest=True)
if not autosend:
subject = 'URL Abuse report from ' + ip
else:
subject = 'URL Abuse report sent automatically'
msg = Message(subject, sender='urlabuse@circl.lu', recipients=["info@circl.lu"])
msg.body = urlabuse_query.digest(data)
msg.body = data['digest']
msg.body += '\n\n'
msg.body += json.dumps(data, sort_keys=True, indent=2)
msg.body += json.dumps(data['result'], sort_keys=True, indent=2)
mail.send(msg)
urlabuse_query.set_mail_sent(url)