Documentation ¶
Overview ¶
Package common contains functions, structures, constants to be used across m-mail.
Index ¶
- Variables
- func AddStrToUniqueList(addrArray []string, addr string) []string
- func FormatDate(date time.Time) string
- func HasSpecials(text string) bool
- func HostPortAddr(host string, port int) string
- func ParseAddress(addr string) (string, error)
- func SearchString(strArray []string, value string) bool
- type Encoding
- type File
- type Header
- type MimeEncoder
- type Part
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BEncoding = MimeEncoder{mime.BEncoding} QEncoding = MimeEncoder{mime.QEncoding} LastIndexByte = strings.LastIndexByte NewQPWriter = quotedprintable.NewWriter SmtpNewClient = func(conn net.Conn, host string) (*smtp.Client, error) { return smtp.NewClient(conn, host) } )
Functions ¶
func AddStrToUniqueList ¶
Add an address to an address array
func FormatDate ¶
FormatDate formats a date as a valid RFC 5322 date.
func HostPortAddr ¶
Return formated address for host and port
func SearchString ¶
Check whether a string is present in string array
Types ¶
type Encoding ¶
type Encoding string
Encoding represents a MIME encoding scheme like quoted-printable or base64.
const ( // QuotedPrintable represents the quoted-printable encoding as defined in // RFC 2045. QuotedPrintable Encoding = "quoted-printable" // Base64 represents the base64 encoding as defined in RFC 2045. Base64 Encoding = "base64" // Unencoded can be used to avoid encoding the body of an email. The headers // will still be encoded using quoted-printable encoding. Unencoded Encoding = "8bit" )
type MimeEncoder ¶
type MimeEncoder struct {
mime.WordEncoder
}
Click to show internal directories.
Click to hide internal directories.