from threading import Thread

from flask import current_app
from flask_mail import Message
from app import mail

# TODO: enable threading

def send_async_email(app, msg):
  with app.app_context():
    mail.send(msg)

def send_email(subject, recipients, email_body_html):
  msg = Message(subject,
                recipients=[recipients],
                html=email_body_html,
                sender=('Nordix Open Labs', 'noreply@nordix.org'))

# Thread(target=send_async_email, args=(app, msg)).start()
  mail.send(msg)

def notify_admins(subject, user_identifier):
  msg = Message(subject,
                recipients=['fdegir@gmail.com'],
                sender=('Nordix Open Labs', 'noreply@nordix.org'))

  msg.body = 'New user mail address is ' + user_identifier
  mail.send(msg)

#def send_email(user, template):
#  send_email('Welcome to Nordix Labs!',
#             recipients=[user.email],
#             html=template)
