Closed lewymati closed 7 years ago
Uzyc send_mass_email
Z dokumentacji:
send_mass_mail() vs. send_mail()
The main difference between send_mass_mail() and send_mail() is that send_mail() opens a connection to the mail server each time it’s executed, while send_mass_mail() uses a single connection for all of its messages. This makes send_mass_mail() slightly more efficient.
Wygląda na to że podczas wysyłania każdego maila otwierane jest osobne połączenie SMTP. https://github.com/lewymati/projektzapisy/blob/master/zapisy/mailer/engine.py#L78
Trzeba zmodyfikować kod, by otwierał O(1) połączeń ;) można użyć np: https://django.readthedocs.io/en/1.4/topics/email.html#send-mass-mail albo zrobić to bardziej niskopoziomowo: https://django.readthedocs.io/en/1.4/topics/email.html#sending-multiple-emails