Source

yt.hub / ythub / send_email.py

Full commit
from random import choice
import string, os
from email.mime.text import MIMEText
import smtplib
from ythub.local_config import smtp_user, smtp_host, smtp_address, smtp_pass

pw_recovery_template = r"""
Hi there!

Your password on the yt Data Hub ( https://hub.yt-project.org/ ) has been
reset.  A temporary password has been issued to you:

%s

Please visit the user login page to log in and reset your password:

https://hub.yt-project.org/login

Thanks,

yt data hub
"""

new_user_notice = r"""
Hi there!

A new user has been created on the yt Data Hub:

Username: %(username)s
Name:     %(name)s
E-mail:   %(email)s

Thanks,

yt data hub
"""