File size: 321 Bytes
aa70399 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from flask_mail import Message
from flask import current_app
from .extensions import mail
def send_otp(email, otp):
msg = Message(
subject="Your OTP Code",
sender=current_app.config["MAIL_USERNAME"],
recipients=[email]
)
msg.body = f"Your OTP is {otp}"
mail.send(msg)
|