Lines Matching refs:Client
29 // A Client represents a client connection to an SMTP server.
30 type Client struct {
31 // Text is the textproto.Conn used by the Client. It is exported to allow for
37 // whether the Client is using TLS
49 // Dial returns a new Client connected to an SMTP server at addr.
51 func Dial(addr string) (*Client, error) {
60 // NewClient returns a new Client using an existing connection and host as a
62 func NewClient(conn net.Conn, host string) (*Client, error) {
69 c := &Client{Text: text, conn: conn, serverName: host, localName: "localhost"}
75 func (c *Client) Close() error {
80 func (c *Client) hello() error {
92 // Calling this method is only necessary if the client needs control
93 // over the host name used. The client will introduce itself as "localhost"
96 func (c *Client) Hello(localName string) error {
108 func (c *Client) cmd(expectCode int, format string, args ...interface{}) (int, string, error) {
121 func (c *Client) helo() error {
129 func (c *Client) ehlo() error {
156 func (c *Client) StartTLS(config *tls.Config) error {
164 c.conn = tls.Client(c.conn, config)
170 // TLSConnectionState returns the client's TLS connection state.
173 func (c *Client) TLSConnectionState() (state tls.ConnectionState, ok bool) {
185 func (c *Client) Verify(addr string) error {
196 // Auth authenticates a client using the provided authentication mechanism.
199 func (c *Client) Auth(a Auth) error {
246 func (c *Client) Mail(from string) error {
266 func (c *Client) Rcpt(to string) error {
275 c *Client
289 func (c *Client) Data() (io.WriteCloser, error) {
379 func (c *Client) Extension(ext string) (bool, string) {
393 func (c *Client) Reset() error {
403 func (c *Client) Noop() error {
412 func (c *Client) Quit() error {