input: Write a function to send an automated email to a list of recipient emails. The function should take a list of emails as input, iterate over the list, and send an email to each address. If any email fails to send, print an error message. If all emails are sent successfully, print a success message.
  
  function_email_sender(recipient_emails)
  
  assert function_email_sender(["email1@example.com","email2@example.com"])==None
  assert function_email_sender([])==None
output: def function_email_sender(recipient_emails):
      if not recipient_emails:
          return
      for email in recipient_emails:
          try:
              # Simulate sending email
              pass
          except Exception as e:
              print(f"Failed to send email to {email}: {e}")
              return
      print("All emails sent successfully.")