MCPcopy Create free account
hub / github.com/labstack/gommon / writeFile

Method writeFile

email/email.go:83–92  ·  view source on GitHub ↗
(f *File, disposition string)

Source from the content-addressed store, hash-verified

81}
82
83func (m *Message) writeFile(f *File, disposition string) {
84 m.writeBoundary()
85 m.writeHeader("Content-Type", f.Type+`; name="`+f.Name+`"`)
86 m.writeHeader("Content-Disposition", disposition+`; filename="`+f.Name+`"`)
87 m.writeHeader("Content-Transfer-Encoding", "base64")
88 m.buffer.WriteString("\r\n")
89 m.buffer.WriteString(f.Content)
90 m.buffer.WriteString("\r\n")
91 m.buffer.WriteString("\r\n")
92}
93
94func (e *Email) Send(m *Message) (err error) {
95 // Message header

Callers 1

SendMethod · 0.80

Calls 2

writeBoundaryMethod · 0.95
writeHeaderMethod · 0.95

Tested by

no test coverage detected