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. Use the smtplib library to establish the connection and send the emails. If the email is sent successfully, print 'Email sent successfully.' for each email.
  assert send_emails(["email1@example.com","email2@example.com"])==None
  assert send_emails(["email3@example.com","email4@example.com"])==None
  assert send_emails(["email5@example.com"])==None
  assert send_emails([])==None
output: import smtplib
  from email.mime.text import MIMEText
  
  def send_emails(recipients):
      smtp_server = "smtp.example.com"
      sender_email = "your_email@example.com"
      sender_password = "your_password"
      subject = "Test Email"
      body = "This is a test email sent using Python."
  
      for recipient in recipients:
          msg = MIMEText(body)
          msg['Subject'] = subject
          msg['From'] = sender_email
          msg['To'] = recipient
  
          with smtplib.SMTP(smtp_server) as server:
              server.starttls()
              server.login(sender_email, sender_password)
              server.sendmail(sender_email, recipient, msg.as_string())
              print('Email sent successfully.')