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"}
74 func (c *Client) Close() error {
79 func (c *Client) hello() error {
91 // Calling this method is only necessary if the client needs control
92 // over the host name used. The client will introduce itself as "localhost"
95 func (c *Client) Hello(localName string) error {
104 func (c *Client) cmd(expectCode int, format string, args ...interface{}) (int, string, error) {
117 func (c *Client) helo() error {
125 func (c *Client) ehlo() error {
152 func (c *Client) StartTLS(config *tls.Config) error {
160 c.conn = tls.Client(c.conn, config)
166 // TLSConnectionState returns the client's TLS connection state.
169 func (c *Client) TLSConnectionState() (state tls.ConnectionState, ok bool) {
181 func (c *Client) Verify(addr string) error {
189 // Auth authenticates a client using the provided authentication mechanism.
192 func (c *Client) Auth(a Auth) error {
239 func (c *Client) Mail(from string) error {
256 func (c *Client) Rcpt(to string) error {
262 c *Client
276 func (c *Client) Data() (io.WriteCloser, error) {
358 func (c *Client) Extension(ext string) (bool, string) {
372 func (c *Client) Reset() error {
381 func (c *Client) Quit() error {