ikvk / imap_tools

Work with email by IMAP
Apache License 2.0
706 stars 80 forks source link

Add __repr__ to MailMessage #233

Closed thomwiggers closed 5 months ago

thomwiggers commented 5 months ago

This should help with debugging and logging, e.g. as is done in paperless-ngx:

[2024-04-11 14:50:01,613] [DEBUG] [paperless_mail] Skipping mail <imap_tools.message.MailMessage object at 0x7458141155d0>, already processed.

ikvk commented 5 months ago

You have described logic for __str__, I will think about it

ikvk commented 5 months ago

For more back compat - f string is bad. In next release I will make __str__ as: 'date from subj'