ikvk / imap_tools

Work with email by IMAP
Apache License 2.0
719 stars 83 forks source link

Add __repr__ to MailMessage #233

Closed thomwiggers closed 7 months ago

thomwiggers commented 7 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 7 months ago

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

ikvk commented 7 months ago

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