Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/emersion/go-smtp
/ functions
Functions
251 in github.com/emersion/go-smtp
⨍
Functions
251
◇
Types & classes
43
↓ 89 callers
Method
writeResponse
(code int, enhCode EnhancedCode, text ...string)
conn.go:1282
↓ 72 callers
Method
Close
()
server_test.go:199
↓ 29 callers
Method
String
()
server_test.go:230
↓ 28 callers
Function
testServerAuthenticated
(t *testing.T)
server_test.go:358
↓ 18 callers
Method
Close
Close closes the connection.
client.go:180
↓ 17 callers
Method
Close
()
conn.go:169
↓ 17 callers
Function
NewClient
NewClient returns a new Client using an existing connection and host as a server name to be used when authenticating.
client.go:103
↓ 14 callers
Method
Mail
Mail issues a MAIL command to the server using the provided email address. If the server supports the 8BITMIME extension, Mail adds the BODY=8BITMIME
client.go:426
↓ 14 callers
Method
Rcpt
Rcpt issues a RCPT command to the server using the provided email address. A call to Rcpt must be preceded by a call to Mail and may be followed by a
client.go:492
↓ 13 callers
Method
cmd
cmd is a convenience function that sends a command and returns the response textproto.Error returned by c.text.ReadResponse is converted into SMTPErro
client.go:254
↓ 12 callers
Method
hello
hello runs a hello exchange if needed.
client.go:204
↓ 12 callers
Function
testServerEhlo
(t *testing.T, fn ...serverConfigureFunc)
server_test.go:278
↓ 11 callers
Method
Session
()
conn.go:157
↓ 9 callers
Method
Quit
Quit sends the QUIT command and closes the connection to the server. If Quit fails the connection is not closed, Close should be used in this case.
client.go:888
↓ 8 callers
Method
Extension
Extension reports whether an extension is support by the server. The extension name is case-insensitive. If the extension is supported, Extension also
client.go:811
↓ 8 callers
Method
SetDeadline
(time.Time)
client_test.go:68
↓ 7 callers
Method
Close
()
client_test.go:65
↓ 7 callers
Method
Hello
Hello sends a HELO or EHLO to the server as the given host name. Calling this method is only necessary if the client needs control over the host name
client.go:233
↓ 7 callers
Method
reset
()
conn.go:1333
↓ 6 callers
Method
Write
Write implements io.Writer.
client.go:572
↓ 5 callers
Method
Data
Set currently processed message contents and send it. r must be consumed before Data returns.
backend.go:65
↓ 5 callers
Method
Error
()
data.go:32
↓ 5 callers
Method
Printf
(format string, v ...interface{})
server.go:19
↓ 5 callers
Method
Println
(v ...interface{})
server.go:20
↓ 5 callers
Method
TLSConnectionState
TLSConnectionState returns the connection's TLS connection state. Zero values are returned if the connection doesn't use TLS.
conn.go:188
↓ 5 callers
Method
Verify
Verify checks the validity of an email address on the server. If Verify returns nil, the address is valid. A non-nil return does not necessarily indic
client.go:352
↓ 5 callers
Function
dataErrorToStatus
(err error)
conn.go:1257
↓ 5 callers
Method
readByte
()
parse.go:114
↓ 5 callers
Method
writeError
(code int, enhCode EnhancedCode, err error)
conn.go:1314
↓ 4 callers
Method
Auth
Auth authenticates a client using the provided authentication mechanism. Only servers that advertise the AUTH extension support this function. If ser
client.go:367
↓ 4 callers
Method
Data
Data issues a DATA command to the server and returns a writer that can be used to write the mail headers and body. The caller should close the writer
client.go:700
↓ 4 callers
Method
RemoteAddr
()
client_test.go:67
↓ 4 callers
Method
Serve
Serve accepts incoming connections on the Listener l.
server.go:107
↓ 4 callers
Method
acceptByte
(ch byte)
parse.go:122
↓ 4 callers
Method
fillRemaining
fillRemaining sets status for all recipients SetStatus was not called for before.
conn.go:1177
↓ 4 callers
Function
isPrintableASCII
(val string)
conn.go:662
↓ 4 callers
Method
peekByte
()
parse.go:107
↓ 4 callers
Method
readResponse
(expectCode int)
client.go:244
↓ 4 callers
Function
testServerGreetedLMTP
(t *testing.T, fn ...serverConfigureFunc)
lmtp_server_test.go:14
↓ 4 callers
Function
validateLine
validateLine checks to see if a line has CR or LF.
client.go:956
↓ 3 callers
Method
Accept
()
server_test.go:195
↓ 3 callers
Method
Addr
()
server_test.go:210
↓ 3 callers
Method
Close
Close immediately closes all active listeners and connections. Close returns any error returned from closing the server's underlying listener(s).
server.go:262
↓ 3 callers
Method
SendMail
SendMail will use an existing connection to send an email from address from, to addresses to, with message r. This function does not start TLS, nor d
client.go:722
↓ 3 callers
Method
SetStatus
(rcptTo string, err error)
backend.go:92
↓ 3 callers
Function
decodeXtext
(val string)
conn.go:457
↓ 3 callers
Method
ehlo
ehlo sends the EHLO (extended hello) greeting to the server. It should be the preferred greeting for servers that support it.
client.go:278
↓ 3 callers
Function
encodeXtext
(raw string)
conn.go:599
↓ 3 callers
Method
parseReversePath
()
parse.go:142
↓ 3 callers
Method
protocolError
protocolError writes errors responses and closes the connection once too many have occurred.
conn.go:211
↓ 3 callers
Function
sendDeliveryCmdsLMTP
(t *testing.T, scanner *bufio.Scanner, c io.Writer)
lmtp_server_test.go:25
↓ 3 callers
Function
testServerGreeted
(t *testing.T, fn ...serverConfigureFunc)
server_test.go:267
↓ 2 callers
Method
Auth
(mech string)
backend.go:101
↓ 2 callers
Method
CloseWithLMTPResponse
CloseWithLMTPResponse is equivalent to Close, but also returns per-recipient server responses. It can only be called when the LMTP protocol is used.
client.go:616
↓ 2 callers
Method
CloseWithResponse
CloseWithResponse is equivalent to Close, but also returns the server response. It cannot be called when the LMTP protocol is used. If server returns
client.go:591
↓ 2 callers
Function
DialStartTLS
DialStartTLS returns a new Client connected to an SMTP server via STARTTLS at addr. The addr must include a port, as in "mail.example.com:smtp". A ni
client.go:89
↓ 2 callers
Method
Error
Error implements error.
client.go:680
↓ 2 callers
Method
LMTPData
LMTPData is the LMTP-specific version of Data method. It can be optionally implemented by the backend to provide per-recipient status information when
backend.go:86
↓ 2 callers
Method
ListenAndServe
ListenAndServe listens on the network address s.Addr and then calls Serve to handle requests on incoming connections. If s.Addr is blank and LMTP is
server.go:222
↓ 2 callers
Method
Logout
Free all resources associated with session.
backend.go:56
↓ 2 callers
Method
Mail
Set return path for currently processed message.
backend.go:59
↓ 2 callers
Method
Next
(fromServer []byte)
client_test.go:57
↓ 2 callers
Method
Rcpt
Add recipient for currently processed message.
backend.go:61
↓ 2 callers
Method
Send
(err error)
server_test.go:186
↓ 2 callers
Method
Server
()
conn.go:153
↓ 2 callers
Method
SetReadDeadline
(time.Time)
client_test.go:69
↓ 2 callers
Method
SetWriteDeadline
(time.Time)
client_test.go:70
↓ 2 callers
Method
Shutdown
Shutdown gracefully shuts down the server without interrupting any active connections. Shutdown works by first closing all open listeners and then wai
server.go:293
↓ 2 callers
Method
authAllowed
()
conn.go:204
↓ 2 callers
Function
checkNotifySet
(values []DSNNotify)
conn.go:794
↓ 2 callers
Method
close
()
client.go:653
↓ 2 callers
Method
createStatusCollector
()
conn.go:1144
↓ 2 callers
Function
cutPrefixFold
cutPrefixFold is a version of strings.CutPrefix which is case-insensitive.
parse.go:11
↓ 2 callers
Function
decodeSASLResponse
(s string)
conn.go:898
↓ 2 callers
Method
expectByte
(ch byte)
parse.go:131
↓ 2 callers
Method
helo
helo sends the HELO greeting to the server. It should be used only when the server does not support ehlo.
client.go:270
↓ 2 callers
Method
init
()
conn.go:59
↓ 2 callers
Function
initStartTLS
(c *Client, tlsConfig *tls.Config)
client.go:130
↓ 2 callers
Method
network
()
server.go:208
↓ 2 callers
Function
newDataReader
(c *Conn)
data.go:58
↓ 2 callers
Function
newLocalListener
(t *testing.T)
client_test.go:675
↓ 2 callers
Function
newMockError
(msg string, temporary bool)
server_test.go:222
↓ 2 callers
Function
parseArgs
Takes the arguments proceeding a command and files them into a map[string]string after uppercasing each key. Sample arg string: " BODY=8BITMIME SIZ
parse.go:52
↓ 2 callers
Method
parseMailbox
()
parse.go:171
↓ 2 callers
Method
parsePath
()
parse.go:150
↓ 2 callers
Method
readLine
Reads a line of input
conn.go:1323
↓ 2 callers
Function
sendLHLO
(t *testing.T, scanner *bufio.Scanner, c io.Writer)
lmtp_server_test.go:40
↓ 2 callers
Function
sendMail
nil, except for tests
client.go:746
↓ 2 callers
Function
serverHandle
smtp server, finely tailored to deal with our own client only!
client_test.go:695
↓ 2 callers
Method
setConn
setConn sets the underlying network connection for the client.
client.go:152
↓ 2 callers
Method
setSession
(session Session)
conn.go:163
↓ 2 callers
Method
startTLS
startTLS sends the STARTTLS command and encrypts all further communication. Only servers that advertise the STARTTLS extension support this function.
client.go:311
↓ 2 callers
Function
testServer
(t *testing.T, fn ...serverConfigureFunc)
server_test.go:242
↓ 2 callers
Function
toSMTPErr
toSMTPErr converts textproto.Error into SMTPError, parsing enhanced status code if it is present.
client.go:918
↓ 1 callers
Method
AuthMechanisms
()
backend.go:100
↓ 1 callers
Method
Data
(r io.Reader)
server_test.go:127
↓ 1 callers
Function
Dial
Dial returns a new Client connected to an SMTP server at addr. The addr must include a port, as in "mail.example.com:smtp". This function returns a p
client.go:57
↓ 1 callers
Function
DialTLS
DialTLS returns a new Client connected to an SMTP server via TLS at addr. The addr must include a port, as in "mail.example.com:smtps". A nil tlsConf
client.go:71
↓ 1 callers
Method
MaxMessageSize
MaxMessageSize returns the maximum message size accepted by the server. 0 means unlimited. If the server doesn't convey this information, ok = false
client.go:841
↓ 1 callers
Method
NewSession
(c *Conn)
backend.go:34
next →
1–100 of 251, ranked by callers