Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/go-gomail/gomail
/ functions
Functions
148 in github.com/go-gomail/gomail
⨍
Functions
148
◇
Types & classes
24
↓ 42 callers
Method
SetHeader
SetHeader sets a value to the given header field.
message.go:100
↓ 21 callers
Method
SetBody
SetBody sets the body of the message.
message.go:181
↓ 16 callers
Function
NewMessage
NewMessage creates a new message. It uses UTF-8 and quoted-printable encoding by default.
message.go:32
↓ 15 callers
Function
testMessage
(t *testing.T, m *Message, bCount int, want *message)
message_test.go:480
↓ 12 callers
Method
Attach
Attach attaches the files to the email.
message.go:295
↓ 12 callers
Function
mockCopyFile
(name string)
message_test.go:592
↓ 10 callers
Method
Close
()
smtp.go:174
↓ 10 callers
Method
do
(cmd string)
smtp_test.go:163
↓ 9 callers
Method
writeString
(s string)
writeto.go:152
↓ 8 callers
Function
testPlainAuth
(t *testing.T, test *plainAuthTest)
auth_test.go:109
↓ 7 callers
Method
SetAddressHeader
SetAddressHeader sets an address to the given header field.
message.go:123
↓ 7 callers
Method
SetHeaders
SetHeaders sets the message headers.
message.go:116
↓ 5 callers
Method
Embed
Embed embeds the images to the email.
message.go:300
↓ 5 callers
Method
FormatAddress
FormatAddress formats an address and a name as a valid RFC 5322 address.
message.go:128
↓ 5 callers
Function
testSendMail
(t *testing.T, d *Dialer, want []string)
smtp_test.go:194
↓ 4 callers
Method
AddAlternative
AddAlternative adds an alternative part to the message. It is commonly used to send HTML emails that default to the plain text version for backward c
message.go:199
↓ 4 callers
Method
Dial
Dial dials and authenticates to an SMTP server. The returned SendCloser should be closed when done using it.
smtp.go:49
↓ 4 callers
Method
FormatDate
FormatDate formats a date as a valid RFC 5322 date.
message.go:171
↓ 4 callers
Function
NewPlainDialer
NewPlainDialer returns a Dialer. The given parameters are used to connect to the SMTP server via a PLAIN authentication mechanism. It fallbacks to th
smtp.go:34
↓ 4 callers
Method
Reset
Reset resets the message so it can be reused. The message keeps its previous settings so it is in the same state that after a call to NewMessage.
message.go:52
↓ 4 callers
Function
Send
Send sends emails using the given Sender.
send.go:36
↓ 4 callers
Method
Send
(from string, to []string, msg io.WriterTo)
send.go:14
↓ 4 callers
Method
WriteTo
WriteTo implements io.WriterTo. It dumps the whole message into w.
writeto.go:14
↓ 4 callers
Method
setHeader
(field, value string)
message.go:235
↓ 3 callers
Method
DialAndSend
DialAndSend opens a connection to the SMTP server, sends the given emails and closes the connection.
smtp.go:113
↓ 3 callers
Function
SetEncoding
SetEncoding is a message setting to set the encoding of the email.
message.go:79
↓ 3 callers
Method
Write
(p []byte)
writeto.go:141
↓ 3 callers
Method
Write
(p []byte)
smtp_test.go:180
↓ 3 callers
Function
addr
(host string, port int)
smtp.go:107
↓ 3 callers
Method
closeMultipart
()
writeto.go:100
↓ 3 callers
Function
compareBodies
(t *testing.T, got, want string)
message_test.go:529
↓ 3 callers
Method
getPartHeader
(contentType string)
message.go:222
↓ 3 callers
Method
openMultipart
(mimeType string)
writeto.go:80
↓ 3 callers
Method
writeHeader
(k string, v ...string)
writeto.go:170
↓ 3 callers
Method
writeHeaders
(h map[string][]string)
writeto.go:177
↓ 2 callers
Method
AddAlternativeWriter
AddAlternativeWriter adds an alternative part to the message. It can be useful with the text/template or html/template packages.
message.go:213
↓ 2 callers
Method
Extension
(string)
smtp.go:167
↓ 2 callers
Function
SetCharset
SetCharset is a message setting to set the charset of the email.
message.go:72
↓ 2 callers
Method
SetDateHeader
SetDateHeader sets a date to the given header field.
message.go:166
↓ 2 callers
Method
addFiles
(files []*file, isAttachment bool)
writeto.go:107
↓ 2 callers
Method
appendFile
(list []*file, name string, settings []FileSetting)
message.go:266
↓ 2 callers
Function
assertAddr
(t *testing.T, got, want string)
smtp_test.go:238
↓ 2 callers
Function
assertConfig
(t *testing.T, got, want *tls.Config)
smtp_test.go:244
↓ 2 callers
Method
createPart
(h map[string][]string)
writeto.go:96
↓ 2 callers
Method
encodeString
(value string)
message.go:111
↓ 2 callers
Function
getTestMessage
()
send_test.go:53
↓ 2 callers
Method
hasAlternativePart
()
writeto.go:67
↓ 2 callers
Method
hasMixedPart
()
writeto.go:59
↓ 2 callers
Method
hasRelatedPart
()
writeto.go:63
↓ 2 callers
Function
missingLine
(t *testing.T, line, got, want string)
message_test.go:573
↓ 2 callers
Function
parseAddress
(field string)
send.go:110
↓ 2 callers
Method
tlsConfig
()
smtp.go:99
↓ 2 callers
Method
writeBody
(f func(io.Writer) error, enc Encoding)
writeto.go:189
↓ 1 callers
Method
Auth
(smtp.Auth)
smtp.go:169
↓ 1 callers
Method
Close
()
send.go:20
↓ 1 callers
Method
Data
()
smtp.go:172
↓ 1 callers
Method
Mail
(string)
smtp.go:170
↓ 1 callers
Method
Next
(fromServer []byte, more bool)
auth.go:47
↓ 1 callers
Method
Quit
()
smtp.go:173
↓ 1 callers
Method
Rcpt
(string)
smtp.go:171
↓ 1 callers
Function
SetCopyFunc
SetCopyFunc is a file setting to replace the function that runs when the message is sent. It should copy the content of the file to the io.Writer. Th
message.go:260
↓ 1 callers
Function
SetHeader
SetHeader is a file setting to set the MIME header of the message part that contains the file content. Mandatory headers are automatically added if t
message.go:247
↓ 1 callers
Method
Start
(server *smtp.ServerInfo)
auth.go:20
↓ 1 callers
Method
StartTLS
(*tls.Config)
smtp.go:168
↓ 1 callers
Function
addAddress
(list []string, addr string)
send.go:100
↓ 1 callers
Method
applySettings
(settings []MessageSetting)
message.go:61
↓ 1 callers
Function
assertAuth
(t *testing.T, got, want smtp.Auth)
smtp_test.go:232
↓ 1 callers
Method
dial
()
smtp.go:67
↓ 1 callers
Method
encodeHeader
(values []string)
message.go:105
↓ 1 callers
Function
getBoundaries
(t *testing.T, count int, m string)
message_test.go:577
↓ 1 callers
Method
getFrom
()
send.go:64
↓ 1 callers
Method
getRecipients
()
send.go:76
↓ 1 callers
Function
hasSpecials
(text string)
message.go:154
↓ 1 callers
Function
mockCopyFileWithHeader
(m *Message, name string, h map[string][]string)
message_test.go:599
↓ 1 callers
Function
newBase64LineWriter
(w io.Writer)
writeto.go:221
↓ 1 callers
Function
send
(s Sender, m *Message)
send.go:46
↓ 1 callers
Method
sslDial
()
smtp.go:90
↓ 1 callers
Method
starttlsDial
()
smtp.go:74
↓ 1 callers
Function
stubSend
(t *testing.T, wantFrom string, wantTo []string, wantBody string)
send_test.go:62
↓ 1 callers
Function
stubSendMail
(t *testing.T, bCount int, want *message)
message_test.go:487
↓ 1 callers
Method
writeMessage
(m *Message)
writeto.go:20
↓ 1 callers
Method
writeStrings
(a []string, sep string)
writeto.go:157
Method
Auth
(a smtp.Auth)
smtp_test.go:132
Function
BenchmarkFull
(b *testing.B)
message_test.go:604
Method
Close
()
smtp.go:151
Method
Close
()
send_test.go:36
Method
Close
()
smtp_test.go:158
Method
Close
()
smtp_test.go:188
Method
Data
()
smtp_test.go:148
Function
Example
()
example_test.go:13
Function
ExampleMessage_AddAlternative
()
example_test.go:154
Function
ExampleMessage_AddAlternativeWriter
()
example_test.go:159
Function
ExampleMessage_Attach
()
example_test.go:166
Function
ExampleMessage_Embed
()
example_test.go:170
Function
ExampleMessage_FormatAddress
()
example_test.go:175
Function
ExampleMessage_FormatDate
()
example_test.go:179
Function
ExampleMessage_SetAddressHeader
()
example_test.go:185
Function
ExampleMessage_SetBody
()
example_test.go:189
Function
ExampleMessage_SetDateHeader
()
example_test.go:193
Function
ExampleMessage_SetHeader
()
example_test.go:197
next →
1–100 of 148, ranked by callers