You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Meanwhile my email has a symbol that are prohibited for filenames < > : " / \ | ? * and inside the save_file() method, these symbols are not removed automatically.
Images:
Code and files inside
File without symbol inside the subject
File with symbol inside the subject
This is my first time submitting an issue, if there's any mistake that I made, I apologize
Thank you very much ! :DDD
The text was updated successfully, but these errors were encountered:
Until this gets resolved, here is a solution for cleansing a subject in case it contains OS unsafe characters:
from msg_parser import MsOxMessage
msg_obj = MsOxMessage(<eml_file>)
msg_subject = msg_obj.get_properties()['Subject']
# msg_parser uses email Subject as filename. Since this is not safe, Subject should be cleansed
msg_subject = "".join([c for c in msg_subject if c.isalpha() or c.isdigit()]).rstrip()
# Assign cleansed subject back to email object
msg_obj.subject = msg_subject
msg_obj.save_email_file(<file_path>)
Hello, I want to report about an error inside the save_file() method if there is symbols inside the subject because:
Meanwhile my email has a symbol that are prohibited for filenames < > : " / \ | ? * and inside the save_file() method, these symbols are not removed automatically.
Images:
Code and files inside
File without symbol inside the subject
File with symbol inside the subject
This is my first time submitting an issue, if there's any mistake that I made, I apologize
Thank you very much ! :DDD
The text was updated successfully, but these errors were encountered: