Class t.m.s.SMTPClient(basic.LineReceiver, policies.TimeoutMixin):

Part of twisted.mail.smtp View Source View In Hierarchy

Known subclasses: twisted.mail.relay.SMTPRelayer, twisted.mail.smtp.ESMTPClient, twisted.mail.smtp.SMTPSender

SMTP client for sending emails.

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
991 Method __init__ Undocumented
1000 Method sendLine Sends a line to the other end of the connection.
1007 Method connectionMade Called when a connection is made.
1014 Method connectionLost We are no longer connected
1019 Method timeoutConnection Called when the connection times out.
1025 Method lineReceived Override this for when each line is received.
1060 Method smtpConnectionFailed Undocumented
1063 Method smtpTransferFailed Undocumented
1069 Method smtpState_helo Undocumented
1074 Method smtpState_from Undocumented
1085 Method smtpState_disconnect Undocumented
1088 Method smtpState_to Undocumented
1097 Method smtpState_toOrData Undocumented
1114 Method smtpState_data Undocumented
1122 Method smtpState_msgSent Undocumented
1136 Method transformChunk Undocumented
1139 Method finishedFileTransfer Undocumented
1148 Method getMailFrom Return the email address the mail is from.
1152 Method getMailTo Return a list of emails to send to.
1156 Method getMailData Return file-like object containing data of message to be sent.
1163 Method sendError If an error occurs before a mail message is sent sendError will be
1181 Method sentMail Called when an attempt to send an email is completed.
1197 Method _disconnectFromServer Undocumented

Inherited from LineReceiver:

Line # Kind Name Docs
207 Method clearLineBuffer Clear buffered data.
211 Method dataReceived Protocol.dataReceived.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
263 Method rawDataReceived Override this for when raw data is received.
278 Method lineLengthExceeded Called when the maximum line length has been reached.

Inherited from BaseProtocol (via LineReceiver, Protocol):

Line # Kind Name Docs
341 Method makeConnection Make a connection to a transport and a server.

Inherited from _PauseableMixin (via LineReceiver):

Line # Kind Name Docs
172 Method pauseProducing Undocumented
176 Method resumeProducing Undocumented
181 Method stopProducing Undocumented

Inherited from TimeoutMixin:

Line # Kind Name Docs
593 Method callLater Undocumented
597 Method resetTimeout Reset the timeout count down
602 Method setTimeout Change the timeout period
623 Method __timedOut Undocumented
Line # Kind Name Docs
991 Method __init__ Undocumented
593 Method callLater Undocumented
207 Method clearLineBuffer Clear buffered data.
1014 Method connectionLost We are no longer connected
1007 Method connectionMade Called when a connection is made.
211 Method dataReceived Protocol.dataReceived.
1139 Method finishedFileTransfer Undocumented
1156 Method getMailData Return file-like object containing data of message to be sent.
1148 Method getMailFrom Return the email address the mail is from.
1152 Method getMailTo Return a list of emails to send to.
278 Method lineLengthExceeded Called when the maximum line length has been reached.
1025 Method lineReceived Override this for when each line is received.
341 Method makeConnection Make a connection to a transport and a server.
172 Method pauseProducing Undocumented
263 Method rawDataReceived Override this for when raw data is received.
597 Method resetTimeout Reset the timeout count down
176 Method resumeProducing Undocumented
1163 Method sendError If an error occurs before a mail message is sent sendError will be
1000 Method sendLine Sends a line to the other end of the connection.
1181 Method sentMail Called when an attempt to send an email is completed.
241 Method setLineMode Sets the line-mode of this receiver.
256 Method setRawMode Sets the raw mode of this receiver.
602 Method setTimeout Change the timeout period
1060 Method smtpConnectionFailed Undocumented
1114 Method smtpState_data Undocumented
1085 Method smtpState_disconnect Undocumented
1074 Method smtpState_from Undocumented
1069 Method smtpState_helo Undocumented
1122 Method smtpState_msgSent Undocumented
1088 Method smtpState_to Undocumented
1097 Method smtpState_toOrData Undocumented
1063 Method smtpTransferFailed Undocumented
181 Method stopProducing Undocumented
1019 Method timeoutConnection Called when the connection times out.
1136 Method transformChunk Undocumented
623 Method __timedOut Undocumented
1197 Method _disconnectFromServer Undocumented
def __init__(self, identity, logsize=10): (source)
Undocumented
def sendLine(self, line): (source)
Sends a line to the other end of the connection.
def connectionMade(self): (source)

Called when a connection is made.

This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
def connectionLost(self, reason=protocol.connectionDone): (source)
We are no longer connected
def timeoutConnection(self): (source)
Called when the connection times out. Override to define behavior other than dropping the connection.
def lineReceived(self, line): (source)
Override this for when each line is received.
def smtpConnectionFailed(self, code, resp): (source)
Undocumented
def smtpTransferFailed(self, code, resp): (source)
Undocumented
def smtpState_helo(self, code, resp): (source)
Undocumented
def smtpState_from(self, code, resp): (source)
Undocumented
def smtpState_disconnect(self, code, resp): (source)
Undocumented
def smtpState_to(self, code, resp): (source)
Undocumented
def smtpState_toOrData(self, code, resp): (source)
Undocumented
def smtpState_data(self, code, resp): (source)
Undocumented
def smtpState_msgSent(self, code, resp): (source)
Undocumented
def transformChunk(self, chunk): (source)
Undocumented
def finishedFileTransfer(self, lastsent): (source)
Undocumented
def getMailFrom(self): (source)
Return the email address the mail is from.
def getMailTo(self): (source)
Return a list of emails to send to.
def getMailData(self): (source)

Return file-like object containing data of message to be sent.

Lines in the file should be delimited by '\n'.
def sendError(self, exc): (source)
If an error occurs before a mail message is sent sendError will be called. This base class method sends a QUIT if the error is non-fatal and disconnects the connection.
ParametersexcThe SMTPClientError (or child class) raised (type: SMTPClientError )
def sentMail(self, code, resp, numOk, addresses, log): (source)

Called when an attempt to send an email is completed.

If some addresses were accepted, code and resp are the response to the DATA command. If no addresses were accepted, code is -1 and resp is an informative message.
Parameterscodethe code returned by the SMTP Server
respThe string response returned from the SMTP Server
numOKthe number of addresses accepted by the remote host.
addressesis a list of tuples (address, code, resp) listing the response to each RCPT command.
logis the SMTP session log
def _disconnectFromServer(self): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.