input: Write a function to create a Celery task in Python to send an email. The function should take recipient_name, recipient_email, subject, and message as parameters. Use Flask-Mail to send the email and return True if the email is sent successfully, else return False.
  
  
  from celery import Celery
  from flask_mail import Message, Mail
  
  app = Celery('tasks', backend='redis://localhost')
  mail = Mail()
  
  @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
  assert send_email('Jane Doe', 'jane@example.com', 'Welcome', 'Welcome to our platform.')==True
  assert send_email('Alice Brown', 'alice@example.com', 'Reminder', 'This is a reminder email.')==True
  assert send_email('Bob White', 'bob@example.com', 'Important Notice', 'Please review the attached document.')==True
  assert send_email('Charlie Green', 'charlie@example.com', 'Thank You', 'Thank you for your business.')==True
output: @app.task
  def send_email(recipient_name, recipient_email, subject, message):
      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