MCPcopy Create free account
hub / github.com/go-gomail/gomail / ExampleSetCopyFunc

Function ExampleSetCopyFunc

example_test.go:142–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140var m *gomail.Message
141
142func ExampleSetCopyFunc() {
143 m.Attach("foo.txt", gomail.SetCopyFunc(func(w io.Writer) error {
144 _, err := w.Write([]byte("Content of foo.txt"))
145 return err
146 }))
147}
148
149func ExampleSetHeader() {
150 h := map[string][]string{"Content-ID": {"<foo@bar.mail>"}}

Callers

nothing calls this directly

Calls 2

AttachMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…