classification
Title: smtplib.SMTP.sendmail: mta status codes only accessible by local variables
Type: enhancement Stage: resolved
Components: email, Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: [smtplib] collect response data for all recipients
View: 29539
Assigned To: Nosy List: barry, r.david.murray, sls
Priority: normal Keywords: patch

Created on 2019-02-28 18:35 by sls, last changed 2019-02-28 21:37 by r.david.murray. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 12104 closed sls, 2019-02-28 18:51
Messages (3)
msg336864 - (view) Author: sls (sls) * Date: 2019-02-28 18:35
MTA status codes (visible via setdebuglevel(1)) are not accessible as the `sendmail`-method stores them only locally (code, resp).

I suggest to store the mta status codes, for instance: "250, b'2.0.0 Ok: queued as XYZ" etc. in an instance attribute (tuple) to access them on smtp-sessions. 

As an email developer those information are very important to me.
msg336871 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2019-02-28 21:36
Thanks for the PR, but this is a duplicate of #29539, which I think has a better API proposal.  Since the original author never actually submitted a PR there, perhaps you could pick up his work (after pinging the issue).
msg336872 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2019-02-28 21:37
Sorry, that should be #29539.
History
Date User Action Args
2019-02-28 21:37:53r.david.murraysetsuperseder: Deprecate string concatenation without plus -> [smtplib] collect response data for all recipients
messages: + msg336872
2019-02-28 21:36:34r.david.murraysetstatus: open -> closed
versions: + Python 3.8, - Python 3.7
superseder: Deprecate string concatenation without plus
messages: + msg336871

resolution: duplicate
stage: patch review -> resolved
2019-02-28 19:00:57xtreaksetnosy: + barry, r.david.murray
components: + email
2019-02-28 18:51:21slssetkeywords: + patch
stage: patch review
pull_requests: + pull_request12111
2019-02-28 18:35:43slscreate