mirror of
https://github.com/nabbar/golib.git
synced 2025-10-20 06:34:37 +08:00
@@ -28,9 +28,9 @@ package mail
|
||||
type ContentType uint8
|
||||
|
||||
const (
|
||||
// TextPlain sets body type to text/plain in message body
|
||||
// ContentPlainText sets body type to text/plain in message body.
|
||||
ContentPlainText ContentType = iota
|
||||
// TextHTML sets body type to text/html in message body
|
||||
// ContentHTML sets body type to text/html in message body.
|
||||
ContentHTML
|
||||
)
|
||||
|
||||
@@ -44,14 +44,3 @@ func (c ContentType) String() string {
|
||||
|
||||
return ContentPlainText.String()
|
||||
}
|
||||
|
||||
func (c ContentType) getContentType() string {
|
||||
switch c {
|
||||
case ContentPlainText:
|
||||
return "text/plain"
|
||||
case ContentHTML:
|
||||
return "text/html"
|
||||
}
|
||||
|
||||
return ContentPlainText.getContentType()
|
||||
}
|
||||
|
Reference in New Issue
Block a user