From 752c33ad6a412d496fece6876e48ab6c7e2474a4 Mon Sep 17 00:00:00 2001 From: Marian Sigler Date: Sun, 7 Oct 2012 23:38:30 +0200 Subject: Add "captcha"; Send mail when a new account is created. --- app.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app.py') diff --git a/app.py b/app.py index bb4b072..6c64043 100644 --- a/app.py +++ b/app.py @@ -113,6 +113,14 @@ def register_complete(token): # populate request context and session assert login_user(user.uid, user.password) + if app.config.get('MAIL_REGISTER_NOTIFY'): + print 'mail versandt an %s' % app.config['MAIL_REGISTER_NOTIFY'] + send_mail( + app.config['MAIL_REGISTER_NOTIFY'], + u'[accounts] Neuer Benutzer %s' % username, + 'Benutzername: %s\nE-Mail: %s\n' % (username, mail) + ) + flash(u'Benutzer erfolgreich angelegt.', 'success') return redirect(url_for('settings')) -- cgit v1.2.3-1-g7c22