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

Function ExampleMessage_AddAlternativeWriter

example_test.go:159–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157}
158
159func ExampleMessage_AddAlternativeWriter() {
160 t := template.Must(template.New("example").Parse("Hello {{.}}!"))
161 m.AddAlternativeWriter("text/plain", func(w io.Writer) error {
162 return t.Execute(w, "Bob")
163 })
164}
165
166func ExampleMessage_Attach() {
167 m.Attach("/tmp/image.jpg")

Callers

nothing calls this directly

Calls 1

AddAlternativeWriterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…