def METHOD_NAME(user, mail):
    """sends 'user' an email with the contents from the template in 'mail' """
    address = user.get_primary_email()
    if address is not None:
        plaintext = loader.get_template(mail)
        context = {'user': user}
        message = plaintext.render(context)
        send_mail(
            'Welcome in the Open Study Room',
            message,
            'openstudyroom@gmail.com',
            [address.email],
            fail_silently=False,
        )