summaryrefslogtreecommitdiffstats
path: root/Lib/smtplib.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixes (accepts patch) issue1339 - http://bugs.python.org/issue1339Gregory P. Smith2008-01-171-10/+30
| | | | | | | | | - Factor out the duplication of EHLO/HELO in login() and sendmail() to a new function, ehlo_or_helo_if_needed(). - Use ehlo_or_helo_if_needed() in starttls() - Check for the starttls exception in starttls() in the same way as login() checks for the auth extension. Contributed by Bill Fenner.
* Comply with RFC 3207.Gregory P. Smith2008-01-171-0/+8
| | | | Fixes issue 829951 - http://bugs.python.org/issue829951
* More work on SSL support.Bill Janssen2007-09-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing.
* remove use of non-existent SSLFakeSocket in apparently untested codeBill Janssen2007-08-311-4/+2
|
* Don't lie in __all__ attributes when SSL is not available: only add the SSLThomas Wouters2007-08-301-1/+3
| | | | classes when they are actually created.
* This contains a number of things:Bill Janssen2007-08-291-61/+54
| | | | | | | | | | | | | | | | 1) Improve the documentation of the SSL module, with a fuller explanation of certificate usage, another reference, proper formatting of this and that. 2) Fix Windows bug in ssl.py, and general bug in sslsocket.close(). Remove some unused code from ssl.py. Allow accept() to be called on sslsocket sockets. 3) Use try-except-else in import of ssl in socket.py. Deprecate use of socket.ssl(). 4) Remove use of socket.ssl() in every library module, except for test_socket_ssl.py and test_ssl.py.
* Added timeout to smtplib (to SMTP and SMTP_SSL). Also createdFacundo Batista2007-03-281-25/+10
| | | | | the test_smtplib.py file, with a basic test and the timeout ones. Docs are updated too.
* Whitespace normalization.Tim Peters2007-03-121-1/+1
|
* Simplify a little by handling the TCP case first.Neal Norwitz2007-03-101-16/+16
| | | | | Update to use predominant style of spaces around = in args list and print to stderr if debugging.
* Patch #957003: Implement smtplib.LMTP.Martin v. Löwis2007-03-091-1/+46
|
* Use new email module names (#1637162, #1637159, #1637157).Georg Brandl2007-01-221-3/+3
|
* Whitespace normalization.Tim Peters2006-11-031-1/+1
|
* Patch #1567274: Support SMTP over TLS.Martin v. Löwis2006-10-271-5/+34
|
* Normalized a few cases of whitespace in function declarations.Martin Blais2006-06-061-1/+1
| | | | | | | | | | | | Found them using:: find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done (I was doing this all over my own code anyway, because I'd been using spaces in all defs, so I thought I'd make a run on the Python code as well. If you need to do such fixes in your own code, you can use xx-rename or parenregu.el within emacs.)
* bug #1257988: don't bail out on gethostbyname(gethostname()) failureGeorg Brandl2006-03-311-1/+5
|
* Bug #1430298: It is now possible to send a mail with an emptyGeorg Brandl2006-02-171-1/+4
| | | | return address using smtplib.
* SMTP.help() was returning a tuple instead of the promised text.Kurt B. Kaiser2005-06-261-1/+1
|
* Replace list of constants with tuples of constants.Raymond Hettinger2005-02-061-1/+1
|
* Patch #1100140: improved smtp connect debuggingJohannes Gijsbers2005-01-161-2/+2
| | | | | Don't print the same (host, port) tuple thrice when debugging, but first print (host, port), then (ip, port) and then the error message.
* Replace rfc822.parseaddr with email.Utils.parseaddr. The implementation isJohannes Gijsbers2005-01-081-2/+2
| | | | still the same, so there should be no backwards-compatibility problems.
* Patch #1075928: AUTH PLAIN in smtplib.Johannes Gijsbers2004-12-061-1/+1
| | | | | | smtplib can not log in to some server using command AUTH PLAIN, it sends ``user\0user\0pass'' to the server, but ``\0user\0pass'' has better compatibility.
* Debug output is now printed to sys.stderr .Brett Cannon2004-07-101-9/+10
| | | | Closes bug #980938.
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-4/+4
| | | | From SF patch #852334.
* Patch #572031: AUTH method LOGIN for smtplibMartin v. Löwis2002-10-061-1/+1
| | | | (most of the patch hides in rev. 1.59). Backported to 2.2.
* smptlib did not handle empty addresses.Raymond Hettinger2002-09-051-3/+3
| | | | | | | | The problem was that it expected rfc822.parseaddr() to return None upon a parse failure. The actual, documented return value for a parse failure is (None, None). Closes SF bug 602029.
* Whitespace normalization.Tim Peters2002-08-081-1/+1
|
* Patch #586999: Fix multiline string in sendmail example.Martin v. Löwis2002-07-281-1/+1
|
* remove o/s dependancy from testPiers Lauder2002-07-271-7/+32
|
* Remove uses of the string and types modules:Walter Dörwald2002-06-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | x in string.whitespace => x.isspace() type(x) in types.StringTypes => isinstance(x, basestring) isinstance(x, types.StringTypes) => isinstance(x, basestring) type(x) is types.StringType => isinstance(x, str) type(x) == types.StringType => isinstance(x, str) string.split(x, ...) => x.split(...) string.join(x, y) => y.join(x) string.zfill(x, ...) => x.zfill(...) string.count(x, ...) => x.count(...) hasattr(types, "UnicodeType") => try: unicode except NameError: type(x) != types.TupleTuple => not isinstance(x, tuple) isinstance(x, types.TupleType) => isinstance(x, tuple) type(x) is types.IntType => isinstance(x, int) Do not mention the string module in the rlcompleter docstring. This partially applies SF patch http://www.python.org/sf/562373 (with basestring instead of string). (It excludes the changes to unittest.py and does not change the os.stat stuff.)
* Patch #552060: Add SSLFakeSocket.sendall. Also committed for 2.2 maint.Martin v. Löwis2002-06-021-0/+2
|
* Replace boolean test with is None.Raymond Hettinger2002-06-021-1/+1
|
* SF 563203. Replaced 'has_key()' with 'in'.Raymond Hettinger2002-06-011-1/+1
|
* Replace '== None' with 'is None'Raymond Hettinger2002-05-311-1/+1
|
* Whitespace normalization.Tim Peters2002-04-161-2/+2
|
* ehlo(): A proper fix for SF bug #498572. RFC 1869 describes ESMTPBarry Warsaw2002-04-151-1/+5
| | | | | | | | | | | | | which requires that if there are ehlo parameters returned with an ehlo keyword (in the response to EHLO), the keyword and parameters must be delimited by an ASCII space. Thus responses like 250-AUTH=LOGIN should be ignored as non-conformant to the RFC (the `=' isn't allowed in the ehlo keyword). This is a bug fix candidate.
* __init__(): We'll try to be more RFC 2821 compliant by providing for aBarry Warsaw2002-03-261-2/+11
| | | | | | | | | | | | | | | better local_hostname default. According to RFC 2821, it is recommended that the fqdn hostname be provided in the EHLO/HELO verb and if that can't be calculated, to use a domain literal. The rationale for this change is documented in SF patch #497736 which also had privacy concerns about leaking the fqdn in the EHLO/HELO. We decided this wasn't a big concern because no user data is leaked, and the IP will always be leaked. The local_hostname argument is provided for those clients that are super paranoid. Using localhost.localdomain may break some strict smtp servers so we decided against using it as the default.
* SMTP.__init__(): Fixed minor typo in docstring.Barry Warsaw2002-03-251-1/+1
|
* Add local_hostname option to SMTP.__init__. If supplied, it is usedNeil Schemenauer2002-03-241-10/+10
| | | | as the fully qualified local hostname.
* Accept Unicode strings as SMTP TO addresses. Fixes #521270.Martin v. Löwis2002-02-241-1/+1
| | | | 2.2.1 candidate.
* The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.Martin v. Löwis2002-02-161-3/+1
| | | | | Replaces calls to socket.send() (which isn't guaranteed to send all data) with the new socket.sendall() method.
* send(), ehlo(): Integrate patch #487310 by Fazal Majid. ConsistentlyBarry Warsaw2001-12-141-0/+2
| | | | | | | call self.close() just before raising SMTPServerDisconnected. This allows you to, e.g. reconnect after a server timeout. Merged from the 2.2c1 branch.
* SMTPError should be SMTPException; reported by Neal Norwitz.Fred Drake2001-10-131-2/+2
|
* Only close sockets if they have been created. Reported by Blake Winton.Martin v. Löwis2001-10-071-1/+3
|
* Whitespace normalization.Tim Peters2001-09-181-7/+7
|
* SF patch #461413 (Gerhard Häring): Add STARTTLS feature to smtplibGuido van Rossum2001-09-141-2/+54
| | | | | | | | | | | This patch adds the features from RFC 2487 (Secure SMTP over TLS) to the smtplib module: - A starttls() function - Wrapper classes that simulate enough of sockets and files for smtplib, but really wrap a SSLObject - reset the list of known SMTP extensions at each call of ehlo(). This should have been the case anyway.
* Add login() method and SMTPAuthenticationError exception. SF patchGuido van Rossum2001-09-111-3/+93
| | | | | | | | #460112 by Gerhard Haering. (With slight layout changes to conform to docstrings guidelines and to prevent a line longer than 78 characters. Also fixed some docstrings that Gerhard didn't touch.)
* Remove redundant importAndrew M. Kuchling2001-08-131-1/+1
|
* Initialize msg to avoid unbound locals.Martin v. Löwis2001-07-311-0/+1
|
* Untabify IPv6 changes.Martin v. Löwis2001-07-261-16/+16
|
* Patch #401196: Use getaddrinfo and AF_INET6 in TCP servers and clients.Martin v. Löwis2001-07-241-12/+20
|