input: Write a function to send automated emails to a list of recipients. The function should take a list of email addresses as input, iterate over the list, and send an email to each address. If the email is sent successfully, the function should print "Email sent successfully.".
  def send_automated_emails(recipient_emails):
      import smtplib
  
      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"])
  assert send_automated_emails(["test@example.com"])
  assert send_automated_emails([])
output: def send_automated_emails(recipient_emails):
      import smtplib
  
      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.')