(received_header)
Helper function to grab the 'from' part of a Received email header.
Helper function to grab the 'from' part of a Received email header.
Helper function to grab the from part of a Received email header .
def _get_received_from(received_header):
    """
    Helper function to grab the 'from' part of a Received email header.
    """

    received_header = received_header.replace('\r', '').replace('\n', '')
    info = received_header.split('by ')
    try:
        return info[0]
    except:
        ''
def _get_received_from ( received_header ) : received_header = received_header . replace ( '\r' , '' ) . replace ( '\n' , '' ) info = received_header . split ( 'by ' ) try : return info [ 0 ] except : ''