* [StGIT PATCH] Display a message when the server refused some recipients.
@ 2007-06-27 19:48 Yann Dirson
0 siblings, 0 replies; only message in thread
From: Yann Dirson @ 2007-06-27 19:48 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
When the smtp server directly refuses some recipients, an exception is
only raised when no recipient got the parcel. This patch displays the
recipients which were denied.
Subsequent delivery is still done, no change here.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
stgit/commands/mail.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/mail.py b/stgit/commands/mail.py
index 899cb1a..04bdf02 100644
--- a/stgit/commands/mail.py
+++ b/stgit/commands/mail.py
@@ -176,7 +176,9 @@ def __send_message(smtpserver, from_addr, to_addr_list, msg, sleep,
s.ehlo()
s.login(smtpuser, smtppassword)
- s.sendmail(from_addr, to_addr_list, msg)
+ result = s.sendmail(from_addr, to_addr_list, msg)
+ if len(result):
+ print "mail server refused delivery for the following recipients: %s" % result
# give recipients a chance of receiving patches in the correct order
time.sleep(sleep)
except Exception, err:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-27 19:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-27 19:48 [StGIT PATCH] Display a message when the server refused some recipients Yann Dirson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox