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.
  
  def send_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.')
  
  recipient_emails = ["email1@example.com", "email2@example.com"]
  send_emails(recipient_emails)
output: def send_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.')