Documentation ¶
Index ¶
- Constants
- type Address
- type Capability
- type Changes
- type ChangesResponse
- type DeliveryStatus
- type EmailSubmission
- type Envelope
- type Filter
- type FilterCondition
- type FilterOperator
- type Get
- type GetResponse
- type Query
- type QueryChanges
- type QueryChangesResponse
- type QueryResponse
- type Set
- type SetResponse
- type SortComparator
Constants ¶
const URI jmap.URI = "urn:ietf:params:jmap:submission"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { // The email address Email string `json:"email,omitempty"` // Parameters to send with the email submission, if any SMTP extensions // are used Parameters interface{} `json:"parameters,omitempty"` }
type Capability ¶
type Capability struct { // The maximum number of seconds the server supports for delayed // sending. A value of 0 indicates delayed sending is not supported MaxDelayedSend uint64 `json:"maxDelayedSend,omitempty"` // The set of SMTP submission extensions supported by the server, which // the client may use when creating an EmailSubmission object (see // Section 7). Each key in the object is the ehlo-name, and the value is // a list of ehlo-args. SubmissionExtensions json.RawMessage `json:"submissionExtensions,omitempty"` }
The EmailSubmission Capability
func (*Capability) New ¶
func (m *Capability) New() jmap.Capability
func (*Capability) URI ¶
func (m *Capability) URI() jmap.URI
type Changes ¶
type Changes struct { Account jmap.ID `json:"accountId,omitempty"` SinceState string `json:"sinceState,omitempty"` MaxChanges uint64 `json:"maxChanges,omitempty"` }
Get email submission changes for the whole account https://www.rfc-editor.org/rfc/rfc8621.html#section-7.2
type ChangesResponse ¶
type ChangesResponse struct { Account jmap.ID `json:"accountId,omitempty"` OldState string `json:"oldState,omitempty"` NewState string `json:"newState,omitempty"` HasMoreChanges bool `json:"hasMoreChanges,omitempty"` Created []jmap.ID `json:"created,omitempty"` Updated []jmap.ID `json:"updated,omitempty"` Destroyed []jmap.ID `json:"destroyed,omitempty"` }
type DeliveryStatus ¶
type DeliveryStatus struct { // The SMTP reply returned for the recipient SMTPReply string `json:"smtpReply,omitempty"` // Represents whether the message has been successfully delivered to the // recipient. Will be one of: // - "queued": In a local mail queue // - "yes": Delivered // - "no": Delivery failed // - "unknown": Final delivery status is unknown Delivered string `json:"delivered,omitempty"` // Whether the message has been displayed by the recipient. One of: // - "unknown" // - "yes" Displayed string `json:"displayed,omitempty"` }
type EmailSubmission ¶
type EmailSubmission struct { ID jmap.ID `json:"id,omitempty"` IdentityID jmap.ID `json:"identityId,omitempty"` EmailID jmap.ID `json:"emailId,omitempty"` ThreadID jmap.ID `json:"threadId,omitempty"` Envelope *Envelope `json:"envelope,omitempty"` SendAt *time.Time `json:"sendAt,omitempty"` UndoStatus string `json:"undoStatus,omitempty"` DeliveryStatus map[string]*DeliveryStatus `json:"deliveryStatus,omitempty"` DSNBlobIDs []jmap.ID `json:"dsnBlobIds,omitempty"` MDNBlobIDs []jmap.ID `json:"mdnBlobIds,omitempty"` }
Submission of an Email for delivery to one or more recipients. https://www.rfc-editor.org/rfc/rfc8621.html#section-7
func (*EmailSubmission) MarshalJSON ¶ added in v0.4.2
func (s *EmailSubmission) MarshalJSON() ([]byte, error)
type FilterCondition ¶
type FilterCondition struct { IdentityIDs []jmap.ID `json:"identityIds,omitempty"` EmailIDs []jmap.ID `json:"emailIds,omitempty"` ThreadIDs []jmap.ID `json:"threadIds,omitempty"` UndoStatus string `json:"undoStatus,omitempty"` Before *time.Time `json:"before,omitempty"` After *time.Time `json:"after,omitempty"` }
Email submission filter criteria https://www.rfc-editor.org/rfc/rfc8621.html#section-7.3
func (*FilterCondition) MarshalJSON ¶ added in v0.4.2
func (fc *FilterCondition) MarshalJSON() ([]byte, error)
type FilterOperator ¶
type FilterOperator struct { Operator jmap.Operator `json:"operator,omitempty"` Conditions []Filter `json:"conditions,omitempty"` }
type Get ¶
type Get struct { Account jmap.ID `json:"accountId,omitempty"` IDs []jmap.ID `json:"ids,omitempty"` Properties []string `json:"properties,omitempty"` ReferenceIDs *jmap.ResultReference `json:"#ids,omitempty"` ReferenceProperties *jmap.ResultReference `json:"#properties,omitempty"` }
Get email submission details https://www.rfc-editor.org/rfc/rfc8621.html#section-7.1
type GetResponse ¶
type GetResponse struct { Account jmap.ID `json:"accountId,omitempty"` State string `json:"state,omitempty"` List []*EmailSubmission `json:"list,omitempty"` NotFound []jmap.ID `json:"notFound,omitempty"` }
type Query ¶
type Query struct { Account jmap.ID `json:"accountId,omitempty"` Filter Filter `json:"filter,omitempty"` Sort []*SortComparator `json:"sort,omitempty"` Position int64 `json:"position,omitempty"` Anchor jmap.ID `json:"anchor,omitempty"` AnchorOffset int64 `json:"anchorOffset,omitempty"` Limit uint64 `json:"limit,omitempty"` CalculateTotal bool `json:"calculateTotal,omitempty"` }
List email submission IDs based on filter and sort criteria https://www.rfc-editor.org/rfc/rfc8621.html#section-7.3
type QueryChanges ¶
type QueryChanges struct { Account jmap.ID `json:"accountId,omitempty"` Filter Filter `json:"filter,omitempty"` Sort []*SortComparator `json:"sort,omitempty"` SinceQueryState string `json:"sinceQueryState,omitempty"` MaxChanges uint64 `json:"maxChanges,omitempty"` UpToID jmap.ID `json:"upToId,omitempty"` CalculateTotal bool `json:"calculateTotal,omitempty"` }
Get changes over an email submission query https://www.rfc-editor.org/rfc/rfc8621.html#section-7.4
func (*QueryChanges) Name ¶
func (m *QueryChanges) Name() string
func (*QueryChanges) Requires ¶
func (m *QueryChanges) Requires() []jmap.URI
type QueryChangesResponse ¶
type QueryResponse ¶
type QueryResponse struct { Account jmap.ID `json:"accountId,omitempty"` QueryState string `json:"queryState,omitempty"` CanCalculateChanges bool `json:"canCalculateChanges,omitempty"` Position uint64 `json:"position,omitempty"` IDs []jmap.ID `json:"ids,omitempty"` Total int64 `json:"total,omitempty"` Limit uint64 `json:"limit,omitempty"` }
type Set ¶
type Set struct { Account jmap.ID `json:"accountId,omitempty"` IfInState string `json:"ifInState,omitempty"` Create map[jmap.ID]*EmailSubmission `json:"create,omitempty"` Update map[jmap.ID]jmap.Patch `json:"update,omitempty"` Destroy []jmap.ID `json:"destroy,omitempty"` OnSuccessUpdateEmail map[jmap.ID]jmap.Patch `json:"onSuccessUpdateEmail,omitempty"` OnSuccessDestroyEmail []jmap.ID `json:"onSuccessDestroyEmail,omitempty"` }
Create, delete or modify an email submission https://www.rfc-editor.org/rfc/rfc8621.html#section-7.5
type SetResponse ¶
type SetResponse struct { Account jmap.ID `json:"accountId,omitempty"` OldState string `json:"oldState,omitempty"` NewState string `json:"newState,omitempty"` Created map[jmap.ID]*EmailSubmission `json:"created,omitempty"` Updated map[jmap.ID]*EmailSubmission `json:"updated,omitempty"` Destroyed []jmap.ID `json:"destroyed,omitempty"` NotCreated map[jmap.ID]*jmap.SetError `json:"notCreated,omitempty"` NotUpdated map[jmap.ID]*jmap.SetError `json:"notUpdated,omitempty"` NotDestroyed map[jmap.ID]*jmap.SetError `json:"notDestroyed,omitempty"` }