def msg_to_dict()

in components/processing/libs/processor-msg/src/processors/msg/msg_processor.py [0:0]


def msg_to_dict(msg: MessageBase) -> Dict:
    body = msg.body
    return dict(
        addr_from=msg.sender,
        addr_to=msg.to,
        addr_cc=msg.cc,
        addr_bcc=msg.bcc,
        subject=msg.subject,
        date=msg.date,
        body=body[:MAX_BODY_SIZE] if body else "",
    )