Created
October 2, 2024 22:27
-
-
Save carlosveliz/09b3b0fa34e5be1dfad7766bc28a0f4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if 'Subject' in raw_message: | |
subject, encoding = decode_header(raw_message['Subject'])[0] | |
if isinstance(subject, bytes): | |
subject = subject.decode(encoding if encoding else 'utf-8', errors='replace') | |
message.Subject = subject | |
else: | |
message.Subject = "No se reconoce el asunto" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment