input: Write a function to send automated emails 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 sent successfully, print 'Email sent successfully.' If the list of emails is empty, the function should print 'No emails to send.'
  assert send_emails(["email1@example.com", "email2@example.com"])==None
  assert send_emails([])=='No emails to send.'
output: def send_emails(emails):
      if not emails:
          print('No emails to send.')
      else:
          for email in emails:
              print('Email sent successfully.')