aboutsummaryrefslogtreecommitdiffstats
path: root/climl/hooks.py
diff options
context:
space:
mode:
authorVG <vg@devys.org>2016-06-08 23:33:32 +0200
committerVG <vg@devys.org>2016-06-08 23:33:32 +0200
commit8d1597b10cb49cd54677f7a049afa637cece6134 (patch)
tree6a282a1a6aa19398edea4e4653abbba3fa27d552 /climl/hooks.py
parent791451615a8e34f45b032d1208fc4a4c9a391ce4 (diff)
downloadcliml-8d1597b10cb49cd54677f7a049afa637cece6134.tar.gz
climl-8d1597b10cb49cd54677f7a049afa637cece6134.tar.bz2
climl-8d1597b10cb49cd54677f7a049afa637cece6134.zip
move conf and start a new hook
Diffstat (limited to 'climl/hooks.py')
-rw-r--r--climl/hooks.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/climl/hooks.py b/climl/hooks.py
index 8311da4..cf8ae9d 100644
--- a/climl/hooks.py
+++ b/climl/hooks.py
@@ -2,6 +2,11 @@ import smtplib
from . import interface
+def hook_extract_listname(context, content):
+ print('hook_extract_listname:')
+ print(content)
+
+
def hook_check_ml_restrictions(context, content):
pass
@@ -39,7 +44,7 @@ def hook_send_all(context, content):
raise interface.HookStopIteration()
# TODO: how to send emails here ?
- smtp_server = smtplib.SMTP(context.get('smtp.server'))
+ smtp_server = smtplib.SMTP(context.conf.get('smtp.server'))
#smtp_server.set_debuglevel(1)
smtp_server.sendmail(listaddress, context['recipients'], content)
smtp_server.quit()