Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFileEmpty = errors.New("no file name provided") ErrFileNotExist = errors.New("file does not exist") ErrFile = errors.New("file error") ErrDomainEmpty = errors.New("no domain name provided") ErrDomainInvalid = errors.New("invalid domain name") ErrPortInvalid = errors.New("invalid TCP port") ErrPortNegative = errors.New("port number cannot be negative") ErrPortOutOfRange = fmt.Errorf("port number out of range (maximum port no. is %d)", maxPort) ErrSecurityInvalid = errors.New("invalid security protocol") ErrAuthenticationInvalid = errors.New("invalid authentication method") ErrEmailInvalid = errors.New("invalid email address") ErrAttachmentInvalid = errors.New("invalid attachment") ErrHeaderEmpty = errors.New("header is empty") ErrHeaderNoColon = errors.New("header must contain a colon") ErrHeaderMultipleColons = errors.New("header has multiple colons") ErrHeaderNameEmpty = errors.New("header name is empty") ErrHeaderNameIllegalChars = errors.New("header name contains illegal characters") ErrHeaderBodyEmpty = errors.New("header body is empty") ErrHeaderBodyIllegalChars = errors.New("header body contains illegal characters") ErrHeaderLineTooLong = fmt.Errorf("header line exceeds maximum lenght of %d", MaxLineLength) )
View Source
var (
MaxLineLength = 78
)
Functions ¶
func CheckHeader ¶
Types ¶
type Attachments ¶
type Attachments []FilePath
func (*Attachments) Set ¶
func (at *Attachments) Set(attachments string) error
func (Attachments) String ¶
func (at Attachments) String() string
type AuthenticationMethod ¶
type AuthenticationMethod string
const ( NoAuthentication AuthenticationMethod = "" PlainAuth AuthenticationMethod = "plain" CramMd5Auth AuthenticationMethod = "cram-md5" )
func (*AuthenticationMethod) Set ¶
func (a *AuthenticationMethod) Set(auth string) error
func (AuthenticationMethod) String ¶
func (a AuthenticationMethod) String() string
type DomainName ¶
type DomainName string
func (*DomainName) Set ¶
func (dn *DomainName) Set(host string) error
func (DomainName) String ¶
func (dn DomainName) String() string
type Email ¶
func (Email) GetMailAddress ¶
type EmailAddresses ¶
type EmailAddresses []Email
func (EmailAddresses) GetMailAddresses ¶
func (eas EmailAddresses) GetMailAddresses() []mail.Address
func (*EmailAddresses) Set ¶
func (eas *EmailAddresses) Set(emails string) error
func (EmailAddresses) String ¶
func (eas EmailAddresses) String() string
Click to show internal directories.
Click to hide internal directories.