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>
s.ehlo()
s.login(smtpuser, smtppassword)
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:
# give recipients a chance of receiving patches in the correct order
time.sleep(sleep)
except Exception, err: