input: Write a function that sends an automated email to a list of recipients. The function should accept a list of email addresses, iterate over the list, and send an email to each address. If an email is successfully sent, print 'Email sent successfully.'
  
  def send_automated_emails(recipient_emails):
      sender_email = 'example@gmail.com'
      password = 'example_password'
      
      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'
      
      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.')