Files
golib/mail/file.go
Nicolas JUHEL 2b42aa859d Add Packges:
- smtp : refactor smtp packgage and allow connection context for smtp
- mailer : add package for templating mail (using hermes lib)
- mail : add package to format mal with header to be send to smtp (using lib smple mail)

Add function in package :
- errors : add function to retireve a map of minimal error code and package path of the getMessage function
- version : add function to get root path of package (still existing but not return before this function)
- ioutils : add function to expand bytes.buffer as io.ReadCloser interface
2021-02-15 04:25:59 +01:00

19 lines
291 B
Go

package mail
import "io"
// file represents the files that can be added to the email message.
type File struct {
name string
mime string
data io.ReadCloser
}
func NewFile(name string, mime string, data io.ReadCloser) File {
return File{
name: name,
mime: mime,
data: data,
}
}