{"thread":{"id":"8753","subject":"[StGIT PATCH] Display a message when the server refused some recipients.","startedAt":"2007-06-27T19:48:44Z","lastAt":"2007-06-27T19:48:44Z","messageCount":1,"participants":["Yann Dirson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"45935","messageId":"20070627194844.22513.16185.stgit@gandelf.nowhere.earth","threadId":"8753","inReplyTo":null,"subject":"[StGIT PATCH] Display a message when the server refused some recipients.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-27T19:48:44Z","receivedAt":"2007-06-27T19:48:44Z","isPatch":true,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"When the smtp server directly refuses some recipients, an exception is\nonly raised when no recipient got the parcel.  This patch displays the\nrecipients which were denied.\n\nSubsequent delivery is still done, no change here.\n\nSigned-off-by: Yann Dirson <ydirson@altern.org>\n---\n\n stgit/commands/mail.py |    4 +++-\n 1 files changed, 3 insertions(+), 1 deletions(-)\n\ndiff --git a/stgit/commands/mail.py b/stgit/commands/mail.py\nindex 899cb1a..04bdf02 100644\n--- a/stgit/commands/mail.py\n+++ b/stgit/commands/mail.py\n@@ -176,7 +176,9 @@ def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep,\n             s.ehlo()\n             s.login(smtpuser, smtppassword)\n \n-        s.sendmail(from_addr, to_addr_list, msg)\n+        result = s.sendmail(from_addr, to_addr_list, msg)\n+        if len(result):\n+            print \"mail server refused delivery for the following recipients: %s\" % result\n         # give recipients a chance of receiving patches in the correct order\n         time.sleep(sleep)\n     except Exception, err:\n"}]}