input: Write a function to send an automated email to a list of recipients. The function should iterate over the list of email addresses, establish a connection to an SMTP server, log in using provided credentials, send the email to each recipient, and print a message indicating that the email has been sent successfully. If the list of recipients is empty, the function should not attempt to send any emails and should return immediately.
  
  def send_automated_emails(recipient_emails, sender_email, password):
      if not recipient_emails:
          return
      
      for email in recipient_emails:
          with smtplib.SMTP('smtp.gmail.com', 587) as server:
              server.ehlo()
              server.starttls()
              server.login(sender_email, password)
  
              subject = 'Automated Email from Program'
              message = 'Message body'
   
              server.sendmail(sender_email, email, 'Subject: ' + subject + '\n\n' + message)
              server.quit()
              print('Email sent successfully.')
  
  assert send_automated_emails(["email1@example.com","email2@example.com"], 'example@gmail.com', 'example_password')==None
  assert send_automated_emails([], 'example@gmail.com', 'example_password')==None
output: 
  def send_automated_emails(recipient_emails, sender_email, password):
      if not recipient_emails:
          return
      
      for email in recipient_emails:
          with smtplib.SMTP('smtp.gmail.com', 587) as server:
              server.ehlo()
              server.starttls()
              server.login(sender_email, password)
  
              subject = 'Automated Email from Program'
              message = 'Message body'
   
              server.sendmail(sender_email, email, 'Subject: ' + subject + '\n\n' + message)
              server.quit()
              print('Email sent successfully.')
  