code: def get_mail(session, date=None):
      
      _LOGGER.info("attempting to get mail data")
      if not date:
          date = datetime.datetime.now().date()
      response = _get_dashboard(session, date)
      parsed = BeautifulSoup(response.text, HTML_PARSER)
      mail = []
      for row in parsed.find_all('div', {'class': 'mailpiece'}):
          image = _get_mailpiece_image(row)
          if not image:
              continue
          mail.append({
              'id': _get_mailpiece_id(image),
              'image': _get_mailpiece_url(image),
              'date': date
          })
      return mail
docs: Get mail data.