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 and iterate over the list to send an email to each address. The email should use the provided sender's email and password and send with a predefined subject and message body.
  assert send_emails(["email1@example.com", "email2@example.com"]) == "Emails sent successfully."
  assert send_emails([]) == "No emails sent."
output: def send_emails(recipients):
      if not recipients:
          return "No emails sent."
      
      sender_email = "your_email@example.com"
      sender_password = "your_password"
      subject = "Automated Email"
      message_body = "This is an automated email."
      
      import smtplib
      from email.mime.text import MIMEText
      from email.mime.multipart import MIMEMultipart
      
      try:
          server = smtplib.SMTP('smtp.example.com', 587)
          server.starttls()
          server.login(sender_email, sender_password)
          
          for recipient in recipients:
              msg = MIMEMultipart()
              msg['From'] = sender_email
              msg['To'] = recipient
              msg['Subject'] = subject
              msg.attach(MIMEText(message_body, 'plain'))
              
              server.sendmail(sender_email, recipient, msg.as_string())
          
          server.quit()
          return "Emails sent successfully."
      except Exception as e:
          return str(e)