This question has been flagged

This is about Version 7.0-20131126-00264.

I have a project issue with multiple subscribers. When sending a message in this project issue, five subscribers get an e-mail, but for the sixth one there is an SMTP problem SMTPServerDisconnected: Connection unexpectedly closed. No further subscriber gets an email. In the web user interface, there is no indication of an error. Not so nice, if you respond to a problem report and the reporter never gets a reply, but angry sooner or later.

Questions:

  1. Why are multiple separate emails are send? I'm under the impression that it is the task of the SMTP server. Responsible for sending out the e-mail is mail/mail_mail.py, line 298 for email in email_list:.
  2. Why does SMTP sending stop at the first subscriber leading to an exception? It would seem more logical to me to try all recipients, even if one in the middle leads to an exception. There should be a try/except inside of the forementioned loop, if the loop is really necessary anyway.
  3. Why is there no indication in the web user interface, when sending out an email did not work? The message is shown as sent to all the recipients, but in fact only half of them really got it.
  4. Why is the result res = ir_mail_server.send_email() saved multiple times inside the loop, but checked after the loop as if there where only one call? Bug?
  5. Even body and body_alternative are created multiple times (calls to send_get_mail_body). Why? Are there cases, when a project issue message could have different bodies for different recipients?

TIA!

Avatar
Discard