input: Write a function to create a Celery task in Python that sends an email. The function should take recipient_name, recipient_email, subject, and message as inputs and send an email using Flask-Mail. If the email is successfully sent, return True, otherwise return False.
  from celery import Celery
  from flask_mail import Message
  
  app = Celery('tasks', backend='redis://localhost')
  
  @app.task
  def send_email(recipient_name, recipient_email, subject, message):
   msg = Message(subject, sender='example@example.com', recipients=[recipient_email])
   msg.body = message
   mail.send(msg)
   return True
  
  assert send_email('John Smith', 'john@example.com', 'Hello World', 'This is a test email.')==True
output: 
  msg = Message(subject, sender='example@example.com', recipients=[recipient_email])
  msg.body = message
  try:
      mail.send(msg)
      return True
  except Exception as e:
      return False
  