input: Write a function to send an automated email to a list of recipients. The function should take a list of email addresses as input, iterate over the list, and send an email to each address. The email should include a predefined subject and message body. If the email is successfully sent, it should print "Email sent successfully.".
  
  assert send_automated_email(["email1@example.com","email2@example.com"])==None
  assert send_automated_email(["test@example.com"])==None
  assert send_automated_email([])==None
output: def send_automated_email(recipients):
      subject = "Automated Email"
      message_body = "This is an automated email."
      for email in recipients:
          try:
              # Simulate sending email
              print(f"Sending email to {email} with subject: {subject} and message: {message_body}")
              print("Email sent successfully.")
          except Exception as e:
              print(f"Failed to send email to {email}: {e}")