def METHOD_NAME(user, root_url):
    """Generate an email notification from user"""
    html_template = get_template('notifications/email_notifications.html')
    subject = f'{SiteConfig.get().site_name_short} Notifications'
    to_email_address = user.email
    unread_notifications = Notification.objects.all_unread(user)
    if user.is_staff:
        submissions_awaiting_approval = QuestSubmission.objects.all_awaiting_approval(teacher=user)
    else:
        submissions_awaiting_approval = None
    if unread_notifications or submissions_awaiting_approval:
        text_content = str(unread_notifications)
        html_content = html_template.render({
            'user': user,
            'notifications': unread_notifications,
            'submissions': submissions_awaiting_approval,
            'root_url': root_url,
            'profile_edit_url': reverse('profiles:profile_edit_own')
        })
        email_msg = EmailMultiAlternatives(subject, text_content, to=[to_email_address])
        email_msg.attach_alternative(html_content, "text/html")
        return email_msg
    else:
        return None