Get mail data.

def get_mail(session, date=None):
    """Get mail data."""
    _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