mirror of
https://github.com/nabbar/golib.git
synced 2025-10-25 00:30:22 +08:00
- 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
23 lines
301 B
Go
23 lines
301 B
Go
package mail
|
|
|
|
type recipientType uint8
|
|
|
|
const (
|
|
RecipientTo recipientType = iota
|
|
RecipientCC
|
|
RecipientBCC
|
|
)
|
|
|
|
func (r recipientType) String() string {
|
|
switch r {
|
|
case RecipientTo:
|
|
return "To"
|
|
case RecipientCC:
|
|
return "Cc"
|
|
case RecipientBCC:
|
|
return "Bcc"
|
|
}
|
|
|
|
return RecipientTo.String()
|
|
}
|