MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / send

Method send

tools/python-3.11.9-amd64/Lib/smtplib.py:348–365  ·  view source on GitHub ↗

Send `s' to the server.

(self, s)

Source from the content-addressed store, hash-verified

346 return (code, msg)
347
348 def send(self, s):
349 """Send `s' to the server."""
350 if self.debuglevel > 0:
351 self._print_debug('send:', repr(s))
352 if self.sock:
353 if isinstance(s, str):
354 # send is used by the 'data' command, where command_encoding
355 # should not be used, but 'data' needs to convert the string to
356 # binary itself anyway, so that's not a problem.
357 s = s.encode(self.command_encoding)
358 sys.audit("smtplib.send", self, s)
359 try:
360 self.sock.sendall(s)
361 except OSError:
362 self.close()
363 raise SMTPServerDisconnected('Server not connected')
364 else:
365 raise SMTPServerDisconnected('please run connect() first')
366
367 def putcmd(self, cmd, args=""):
368 """Send a command to the server."""

Callers 9

putcmdMethod · 0.95
dataMethod · 0.95
_remoteMethod · 0.45
writeMethod · 0.45
initiate_sendMethod · 0.45
limited_genFunction · 0.45
parse_fileFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 5

_print_debugMethod · 0.95
closeMethod · 0.95
encodeMethod · 0.45
sendallMethod · 0.45

Tested by

no test coverage detected