Connection
Base URL, credentials and a reachable server.
Review the message fixture at the transport boundary, where an initial dot must remain data after the receiver removes transparency escaping.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
def smtp_data(payload):
if type(payload) is not bytes or len(payload) > 65536:
raise ValueError("bounded bytes")
lines = payload.split(b"\r\n")
if any(b"\r" in x or b"\n" in x for x in lines):
raise ValueError("CRLF lines required")
stuffed = b"\r\n".join(
b"." + x if x.startswith(b".") else x for x in lines)
if stuffed and not stuffed.endswith(b"\r\n"):
stuffed += b"\r\n"
return stuffed + b".\r\n"