docs: def Emailer(recipients, sender=None):
      """ Sends messages as emails to the given list
          of recipients. """
      import smtplib
      hostname = socket.gethostname()
      if not sender:
          sender = 'lggr@{0}'.format(hostname)
      smtp = smtplib.SMTP('localhost')
      try:
          while True:
              logstr = (yield)
              try:
                  smtp.sendmail(sender, recipients, logstr)
              except smtplib.SMTPException:
                  pass
      except GeneratorExit:
          smtp.quit()