input: 
  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): 
      """Creates a Celery task to send an email with the given details.
      >>> send_email('John Smith', 'john@example.com', 'Hello World', 'This is a test email.')
      None
      """
      msg = Message(subject, sender='example@example.com', recipients=[recipient_email])
      msg.body = message
      mail.send(msg)
  
output:     from flask_mail import Mail
      mail = Mail()
  
      msg = Message(subject, sender='example@example.com', recipients=[recipient_email])
      msg.body = f"Dear {recipient_name},\n\n{message}"
      mail.send(msg)