input: Write a function to send an automated email to a list of recipients. 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, the function should print an error message. If all emails are sent successfully, the function should print a success message.
  assert send_automated_emails(["email1@example.com","email2@example.com"])==True
  assert send_automated_emails(["user@example.com","nonexistent@example.com"])==False
  assert send_automated_emails(["valid1@example.com","valid2@example.com"])==True
  assert send_automated_emails([])==True
  assert send_automated_emails(["invalid_email"])==False
output: def send_automated_emails(emails):
      for email in emails:
          if "@" not in email or "." not in email:
              print(f"Error sending email to {email}")
              return False
      print("All emails sent successfully")
      return True