Since python12 utcfromtimestamp is deprecated which generate deprecation warnings
class TestMailTrackingEmailCleanUp(SavepointCaseWithUserDemo):
fix#1445
Up until now, the `sent` event type was never processed, probably because it "made no sense", as an unsent email would never trigger an event.
However, it makes sense to process it because you may have a local relay that transmits mails over to the mail provider. In those circumstances, you should have 2 "sent" events (one from the relay and another one from the provider).
Also marked some useless parts of code for removal.
@Tecnativa TT32365
On our server,
queries based on "mail_tracking_event"."tracking_email_id" improved from 501,924 ms to 1,840 ms
queries based on "mail_tracking_email"."mail_message_id" improved from 167,436 ms to 3,223 ms
The last ones are run several times when a thread has many messages