Trees | Indices | Help |
|
---|
|
SMTP/ESMTP client class.
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP Authentication) and RFC 2487 (Secure SMTP over TLS).
Notes:
Please remember, when doing ESMTP, that the names of the SMTP service extensions are NOT the same thing as the option keywords for the RCPT and MAIL commands!
Example:
>>> import smtplib >>> s=smtplib.SMTP("localhost") >>> print s.help() This is Sendmail version 8.8.4 Topics: HELO EHLO MAIL RCPT DATA RSET NOOP QUIT HELP VRFY EXPN VERB ETRN DSN For more info use "HELP <topic>". To report bugs in the implementation send email to sendmail-bugs@sendmail.org. For local information send email to Postmaster at your site. End of HELP info >>> s.putcmd("vrfy","someone@here") >>> s.getreply() (250, "Somebody OverHere <somebody@here.my.org>") >>> s.quit()
|
|||
SMTPException Base class for all exceptions raised by this module. |
|||
SMTPServerDisconnected Not connected to any SMTP server. |
|||
SMTPResponseException Base class for all exceptions that include an SMTP error code. |
|||
SMTPSenderRefused Sender address refused. |
|||
SMTPRecipientsRefused All recipient addresses refused. |
|||
SMTPDataError The SMTP server didn't accept the data. |
|||
SMTPConnectError Error during connection establishment. |
|||
SMTPHeloError The server refused our HELO reply. |
|||
SMTPAuthenticationError Authentication error. |
|||
SSLFakeSocket A fake socket object that really wraps a SSLObject. |
|||
SSLFakeFile A fake file like object that really wraps a SSLObject. |
|||
SMTP This class manages a connection to an SMTP or ESMTP server. |
|
|||
|
|||
|
|
|||
SMTP_PORT = 25
|
|||
CRLF =
|
|||
OLDSTYLE_AUTH = re.compile(r'
|
Imports: socket, re, email, base64, hmac, encode_base64, stderr
|
Quote a subset of the email addresses defined by RFC 821. Should be able to handle anything rfc822.parseaddr can handle. |
Quote data for email. Double leading '.', and change Unix newline '\n', or Mac '\r' into Internet CRLF end-of-line. |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 13 23:36:19 2008 | http://epydoc.sourceforge.net |