input: Write a function to automate sending emails to a list of recipients. The function should accept a list of email addresses as input, and for each address, it will send an email using a predefined sender email and password. If the email is sent successfully, it should print "Email sent successfully." If the input list of emails is empty, it should print "No emails to send."
  
  def send_automated_emails(recipient_emails):
      sender_email = 'example@gmail.com'
      password = 'example_password'
  
      if not recipient_emails:
          print("No emails to send.")
          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"])==None
  assert send_automated_emails([])==None
output: def send_automated_emails(recipient_emails):
      sender_email = 'example@gmail.com'
      password = 'example_password'
  
      if not recipient_emails:
          print("No emails to send.")
          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.')