Is email.message.get() case insensitive for the header name?

Chris Green cl at isbd.net
Sun Feb 14 15:50:32 EST 2021


It isn't clear from the documentation. Does email.message.get() care
about the case of the header it's getting?

I checking mailing list mails and the "List-Id:" header is a bit
'mixed', i.e. it can be List-Id:, or List-ID: or list-id:, will
email.message.get("List-Id:", "unknown") find all of them?

-- 
Chris Green
·


More information about the Python-list mailing list