Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Address ¶
Address gets email address from a valid email address notation (eg: "Jane Doe" <jane@example.com> -> jane@example.com)
func AddressList ¶
Address gets email address from a valid email address notation (eg: "Jane Doe" <jane@example.com>, john.doe@example.com -> jane@example.com, john.doe@example.com)
func AddressValid ¶
AddressValid checks if email address is valid
Types ¶
type ContentOptions ¶
type ContentOptions struct { // On/Off CC bool Sender bool Recipient bool Subject bool HTML bool Threads bool Threadify bool Stripify bool // Keys MessageIDKey string InReplyToKey string ReferencesKey string SubjectKey string FromKey string ToKey string CcKey string RcptToKey string }
ContentOptions represents settings that specify how an email is to be converted to a Matrix message
type Email ¶
type Email struct { Date string MessageID string InReplyTo string References string From string To string RcptTo string CC []string Subject string Text string HTML string Files []*utils.File InlineFiles []*utils.File }
Email object
func FromEnvelope ¶
FromEnvelope constructs Email object from envelope
func New ¶
func New(messageID, inReplyTo, references, subject, from, to, rcptto, cc, text, html string, files, inline []*utils.File) *Email
New constructs Email object
func (*Email) Compose ¶
Compose converts the email object to a string (to be used for delivery via SMTP) and possibly DKIM-signs it
func (*Email) Content ¶
func (e *Email) Content(threadID id.EventID, options *ContentOptions, psdc *psd.Client) *event.Content
Content converts the email object to a Matrix event content
func (*Email) ContentBody ¶ added in v0.9.17
ContentBody converts the email object to a Matrix event content that contains email body only NOTE: returns nil if threadify is disabled