Versions in this module Expand all Collapse all v0 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + const DateFormat + const ParamNameBoundary + const ParamNameCharset + const ParamNameID + const ParamNameNumber + const ParamNamePadding + const ParamNameTotal + const ParamNameType + var Epoch = func() int64 + func IsValidLocal(local []byte) bool + type Body struct + Parts []*MIME + func ParseBody(raw, boundary []byte) (body *Body, rest []byte, err error) + func (body *Body) Add(mime *MIME) + func (body *Body) Relaxed() (out []byte) + func (body *Body) Set(mime *MIME) + func (body *Body) Simple() (out []byte) + func (body *Body) String() string + type ContentType struct + Params []Param + Sub string + Top string + func ParseContentType(raw []byte) (ct *ContentType, err error) + func (ct *ContentType) GetParamValue(name string) string + func (ct *ContentType) SetBoundary(boundary string) + func (ct *ContentType) String() string + type Field struct + Name string + Params []Param + Type FieldType + Value string + func ParseField(raw []byte) (field *Field, rest []byte, err error) + func (field *Field) Relaxed() (out []byte) + func (field *Field) Simple() (out []byte) + type FieldType int + const FieldTypeBCC + const FieldTypeCC + const FieldTypeComments + const FieldTypeContentDescription + const FieldTypeContentID + const FieldTypeContentTransferEncoding + const FieldTypeContentType + const FieldTypeDKIMSignature + const FieldTypeDate + const FieldTypeFrom + const FieldTypeInReplyTo + const FieldTypeKeywords + const FieldTypeMIMEVersion + const FieldTypeMessageID + const FieldTypeOptional + const FieldTypeReceived + const FieldTypeReferences + const FieldTypeReplyTo + const FieldTypeResentBCC + const FieldTypeResentCC + const FieldTypeResentDate + const FieldTypeResentFrom + const FieldTypeResentMessageID + const FieldTypeResentSender + const FieldTypeResentTo + const FieldTypeReturnPath + const FieldTypeSender + const FieldTypeSubject + const FieldTypeTo + type Header struct + func ParseHeader(raw []byte) (hdr *Header, rest []byte, err error) + func (hdr *Header) Boundary() string + func (hdr *Header) ContentType() *ContentType + func (hdr *Header) DKIM(n int) (dkimHeader *Header) + func (hdr *Header) Filter(ft FieldType) (fields []*Field) + func (hdr *Header) ID() string + func (hdr *Header) PushTop(f *Field) + func (hdr *Header) Relaxed() []byte + func (hdr *Header) Set(ft FieldType, value []byte) (err error) + func (hdr *Header) SetMultipart() (err error) + func (hdr *Header) Simple() []byte + func (hdr *Header) WriteTo(w io.Writer) (n int64, err error) + type MIME struct + Content []byte + Header *Header + func ParseBodyPart(raw, boundary []byte) (mime *MIME, rest []byte, err error) + func (mime *MIME) String() string + func (mime *MIME) WriteTo(w io.Writer) (n int64, err error) + type Mailbox struct + Address string + Domain string + Local string + Name string + func ParseMailbox(raw []byte) (mbox *Mailbox) + func ParseMailboxes(raw []byte) (mboxes []*Mailbox, err error) + func (mbox *Mailbox) MarshalJSON() (b []byte, err error) + func (mbox *Mailbox) String() string + func (mbox *Mailbox) UnmarshalJSON(b []byte) (err error) + type Message struct + Body Body + DKIMSignature *dkim.Signature + Header Header + func NewMultipart(from, to, subject, bodyText, bodyHTML []byte) (msg *Message, err error) + func ParseFile(inFile string) (msg *Message, rest []byte, err error) + func ParseMessage(raw []byte) (msg *Message, rest []byte, err error) + func (msg *Message) AddCC(mailboxes string) (err error) + func (msg *Message) AddTo(mailboxes string) (err error) + func (msg *Message) CanonBody() (body []byte) + func (msg *Message) CanonHeader(subHeader *Header, dkimField *Field) []byte + func (msg *Message) DKIMSign(pk *rsa.PrivateKey, sig *dkim.Signature) (err error) + func (msg *Message) DKIMVerify() (*dkim.Status, error) + func (msg *Message) Pack() (out []byte, err error) + func (msg *Message) SetBodyHTML(content []byte) (err error) + func (msg *Message) SetBodyText(content []byte) (err error) + func (msg *Message) SetCC(mailboxes string) (err error) + func (msg *Message) SetFrom(mailbox string) (err error) + func (msg *Message) SetID(id string) + func (msg *Message) SetSubject(subject string) + func (msg *Message) SetTo(mailboxes string) (err error) + func (msg *Message) String() string + type Param struct + Key string + Quoted bool + Value string