Git development
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGIT PATCH] Display a message when the server refused some recipients.
Date: Wed, 27 Jun 2007 21:48:44 +0200	[thread overview]
Message-ID: <20070627194844.22513.16185.stgit@gandelf.nowhere.earth> (raw)

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:

                 reply	other threads:[~2007-06-27 19:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070627194844.22513.16185.stgit@gandelf.nowhere.earth \
    --to=ydirson@altern.org \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox