コード例 #1
0
ファイル: utils.py プロジェクト: kpstsp/ServerMonitor
def contact_mail(name, email, website, message):
    msg = Message('InspiredProgrammer ServerMonitor - Contact Form', sender='*****@*****.**', recipients=['*****@*****.**'])
    msg.body = f'''
Mail from: {name},
Email: {email},
Website: ({website}),
--------------------------------------
Message:
{message}'''

    mail.send(msg)
コード例 #2
0
ファイル: utils.py プロジェクト: ye-man/ServerMonitor
def send_reset_email(user):
    token = user.get_reset_token()
    msg = Message('Password Reset Request',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f''' 
To reset your password, visit the following link: 
{url_for('users.reset_token', token=token, _external=True)}

If you did not make this request, simply ignore this email.
'''
    mail.send(msg)
コード例 #3
0
ファイル: utils.py プロジェクト: KinKir/ServerMonitor
def send_verification_email(user):
    token = user.get_reset_token()
    msg = Message('Verificate your Email',
                  sender='*****@*****.**',
                  recipients=[user.email])
    msg.body = f'''
To verify your email adress, please visit the following link:
{url_for('users.reset_token', token=token, _external=True)}

If you did not make this request, simply ignore this email.
'''
    mail.send(msg)