diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2016-02-02 03:07:44 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2016-02-02 04:44:07 +0100 |
commit | 9a196839970e7d98a2bd9375bbd470846ccb3a27 (patch) | |
tree | 1c52403114bb5da11db863da72d67f2b6d75ac98 /accounts/utils/__init__.py | |
parent | 34b571a7335ba3d2b71409068b93df603b0271b9 (diff) | |
download | web-9a196839970e7d98a2bd9375bbd470846ccb3a27.tar.gz web-9a196839970e7d98a2bd9375bbd470846ccb3a27.tar.bz2 web-9a196839970e7d98a2bd9375bbd470846ccb3a27.zip |
templates/mail: Get all parts from the template
Also render sender and subject with the mail template, so the mails
can be created with only a template name, a recipient and the template
args. The required confirmation links are also generated in the
templates.
Diffstat (limited to 'accounts/utils/__init__.py')
-rw-r--r-- | accounts/utils/__init__.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/accounts/utils/__init__.py b/accounts/utils/__init__.py index 0a3fa10..0759fd1 100644 --- a/accounts/utils/__init__.py +++ b/accounts/utils/__init__.py @@ -35,18 +35,6 @@ def ensure_utf8(s): return s -def send_register_confirmation_mail(username, mail): - confirm_token = Confirmation('register').dumps((username, mail)) - confirm_link = url_for('default.register_complete', token=confirm_token, _external=True) - - body = render_template('mail/register.txt', username=username, - mail=mail, link=confirm_link) - - current_app.mail_backend.send( - mail, u'E-Mail-Adresse bestätigen', body, - sender=current_app.config.get('MAIL_CONFIRM_SENDER')) - - class NotRegexp(Regexp): """ Like wtforms.validators.Regexp, but rejects data that DOES match the regex. |