Documentation
¶
Overview ¶
Package composing implements $EDITOR interfacing with a Brief sack. The Brief composing model is grounded on an attempt to present the editor with a version of the mail being composed as close to human-readable as possible whilst still being correctly parseable by a lenient parser. Once composed, a very standards-compliant RFC 822 message is produced.
Index ¶
- Constants
- func Composing(osfsys *OSFS) (bool, error)
- func Crlf2Lf(raw []byte) []byte
- func Destroy(osfsys *OSFS) error
- func Edit(osfsys *OSFS, editor string, dealias config.DealiasFunc, ...) error
- func Lf2Crlf(raw []byte) []byte
- func SplitByCommaRespectingDoubleQuotes(text string) []string
- func Write(osfsys *OSFS, alias config.EnaliasFunc, cm *ComposingMessage) errordeprecated
- type Attachment
- type ComposingMessage
- type ExtraPart
- type OSFS
Constants ¶
View Source
const ASCIIWhitespace = "\t\n\r "
View Source
const CRLF = "\r\n"
Variables ¶
This section is empty.
Functions ¶
func Edit ¶
func Edit(osfsys *OSFS, editor string, dealias config.DealiasFunc, enalias config.EnaliasFunc) error
func SplitByCommaRespectingDoubleQuotes ¶
NOTE: Does *not* conform to the full RFC 5322's "address-list": comments, group names, etc. are not accounted for
func Write
deprecated
func Write(osfsys *OSFS, alias config.EnaliasFunc, cm *ComposingMessage) error
Deprecated: TODO: deprecated?
Types ¶
type Attachment ¶
func (Attachment) Part ¶
func (attachment Attachment) Part() *mailx.Part
type ComposingMessage ¶
type ComposingMessage struct { // TODO unrepresented in msgs.(*ParsedMessage) Body []byte BodyLanguage string Attachments []Attachment ExtraParts []ExtraPart Notes []string Date time.Time Froms []*netmail.Address Senders []*netmail.Address Tos []*netmail.Address Ccs []*netmail.Address Bccs []*netmail.Address InReplyTos []msgs.MessageId Subject string ExtraFields []mailx.Field }
func Read ¶
func Read(osfsys *OSFS, dealias config.DealiasFunc) (*ComposingMessage, error)
func (*ComposingMessage) Fixup ¶
func (cm *ComposingMessage) Fixup(enalias config.EnaliasFunc)
func (*ComposingMessage) MarshalBinary ¶
func (cm *ComposingMessage) MarshalBinary() ([]byte, error)
func (*ComposingMessage) Sender ¶
func (cm *ComposingMessage) Sender() (*netmail.Address, error)
func (*ComposingMessage) Simple ¶
func (cm *ComposingMessage) Simple() bool
A simple message is one without any multipart components.
Click to show internal directories.
Click to hide internal directories.