emailsubmission

package
v0.4.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
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

func (*Changes) Name

func (m *Changes) Name() string

func (*Changes) Requires

func (m *Changes) Requires() []jmap.URI

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 Envelope

type Envelope struct {
	// The email address to use as the return address in the SMTP submission
	MailFrom *Address `json:"mailFrom,omitempty"`

	// The email address to send the message to
	RcptTo []*Address `json:"rcptTo,omitempty"`
}

type Filter

type Filter interface {
	// contains filtered or unexported methods
}

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

func (*Get) Name

func (m *Get) Name() string

func (*Get) Requires

func (m *Get) Requires() []jmap.URI

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

func (*Query) Name

func (m *Query) Name() string

func (*Query) Requires

func (m *Query) Requires() []jmap.URI

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 QueryChangesResponse struct {
	Account jmap.ID `json:"accountId,omitempty"`

	OldQueryState string `json:"oldQueryState,omitempty"`

	NewQueryState string `json:"newQueryState,omitempty"`

	Removed []jmap.ID `json:"removed,omitempty"`

	Added []*jmap.AddedItem `json:"added,omitempty"`
}

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

func (*Set) Name

func (m *Set) Name() string

func (*Set) Requires

func (m *Set) Requires() []jmap.URI

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"`
}

type SortComparator

type SortComparator struct {
	Property string `json:"property,omitempty"`

	IsAscending bool `json:"isAscending,omitempty"`

	Collation jmap.CollationAlgo `json:"collation,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL