Versions in this module Expand all Collapse all v2 v2.3.1 Jan 31, 2023 Changes in this version + const UnixDateWithEarlyYear v2.3.0 Jan 30, 2023 Changes in this version + func ParseAddressList(body string) addr.AddressList + func ParseTime(body string) (time.Time, error) v2.2.1 Jan 30, 2023 v2.2.0 Jan 30, 2023 v2.1.0 Jan 27, 2023 v2.0.3 Jan 22, 2023 Changes in this version type Base + func (h *Base) Clone() *Base type Header + func (h *Header) Clone() *Header v2.0.2 Jan 19, 2023 v2.0.1 Jan 19, 2023 v2.0.0 Jan 19, 2023 Changes in this version + const Bcc + const Cc + const Comments + const ContentDisposition + const ContentTransferEncoding + const ContentType + const Date + const From + const InReplyTo + const Keywords + const MessageID + const References + const ReplyTo + const Sender + const Subject + const To + var ErrIndexOutOfRange = errors.New("header field index is out of range") + var ErrManyFields = errors.New("many header fields found") + var ErrNoSuchField = errors.New("not such header field") + var ErrNoSuchFieldParameter = errors.New("no such header field parameter") + var ErrWrongAddressType = errors.New("incorrect address type during write") + type Base struct + func (h *Base) Break() Break + func (h *Base) ClearFields() + func (h *Base) DeleteField(n int) error + func (h *Base) FoldEncoding() *field.FoldEncoding + func (h *Base) GetAllFieldsNamed(name string) []*field.Field + func (h *Base) GetField(n int) *field.Field + func (h *Base) GetFieldNamed(name string, n int) *field.Field + func (h *Base) GetIndexesNamed(name string) []int + func (h *Base) InsertBeforeField(n int, name, body string) + func (h *Base) Len() int + func (h *Base) ListFields() []*field.Field + func (h *Base) SetBreak(lbr Break) + func (h *Base) SetFoldEncoding(vf *field.FoldEncoding) + func (h *Base) WriteTo(w io.Writer) (int64, error) + type Break string + const CR + const CRLF + const LF + const LFCR + const Meh + func (b Break) Bytes() []byte + func (b Break) String() string + type Header struct + func Parse(m []byte, lb Break) (*Header, error) + func (h *Header) Get(name string) (string, error) + func (h *Header) GetAddressList(name string) (addr.AddressList, error) + func (h *Header) GetAll(name string) ([]string, error) + func (h *Header) GetAllAddressLists(name string) ([]addr.AddressList, error) + func (h *Header) GetBcc() (addr.AddressList, error) + func (h *Header) GetBoundary() (string, error) + func (h *Header) GetCc() (addr.AddressList, error) + func (h *Header) GetCharset() (string, error) + func (h *Header) GetComments() ([]string, error) + func (h *Header) GetContentDisposition() (*param.Value, error) + func (h *Header) GetContentType() (*param.Value, error) + func (h *Header) GetDate() (time.Time, error) + func (h *Header) GetFilename() (string, error) + func (h *Header) GetFrom() (addr.AddressList, error) + func (h *Header) GetInReplyTo() (string, error) + func (h *Header) GetKeywords() ([]string, error) + func (h *Header) GetKeywordsList(name string) ([]string, error) + func (h *Header) GetMediaType() (string, error) + func (h *Header) GetMessageID() (string, error) + func (h *Header) GetParamValue(name string) (*param.Value, error) + func (h *Header) GetPresentation() (string, error) + func (h *Header) GetReferences() (string, error) + func (h *Header) GetReplyTo() (addr.AddressList, error) + func (h *Header) GetSender() (addr.AddressList, error) + func (h *Header) GetSubject() (string, error) + func (h *Header) GetTime(name string) (time.Time, error) + func (h *Header) GetTo() (addr.AddressList, error) + func (h *Header) GetTransferEncoding() (string, error) + func (h *Header) Set(name, body string) + func (h *Header) SetAddressList(name string, body ...addr.Address) + func (h *Header) SetAll(name string, bodies ...string) + func (h *Header) SetAllAddressLists(name string, bodies ...addr.AddressList) + func (h *Header) SetBcc(a ...any) error + func (h *Header) SetBoundary(b string) error + func (h *Header) SetCc(a ...any) error + func (h *Header) SetCharset(c string) error + func (h *Header) SetComments(cs ...string) + func (h *Header) SetContentDisposition(v *param.Value) + func (h *Header) SetContentType(v *param.Value) + func (h *Header) SetDate(d time.Time) + func (h *Header) SetFilename(f string) error + func (h *Header) SetFrom(a ...any) error + func (h *Header) SetInReplyTo(ref string) + func (h *Header) SetKeywords(ks ...string) + func (h *Header) SetKeywordsList(name string, keywords ...string) + func (h *Header) SetMediaType(mt string) + func (h *Header) SetMessageID(ref string) + func (h *Header) SetParamValue(name string, body *param.Value) + func (h *Header) SetPresentation(d string) + func (h *Header) SetReferences(ref string) + func (h *Header) SetReplyTo(a ...any) error + func (h *Header) SetSender(a ...any) error + func (h *Header) SetSubject(s string) + func (h *Header) SetTime(name string, body time.Time) + func (h *Header) SetTo(a ...any) error + func (h *Header) SetTransferEncoding(b string)