Documentation
¶
Overview ¶
Package mdn is an implementation of RFC 9007: Handling Message Disposition Notification with the JSON Meta Application Protocol (JMAP). In plain terms, it handles read receipts of emails.
Documentation strings for most of the protocol objects are taken from (or based on) contents of RFC 9007 and is subject to the IETF Trust Provisions. See https://trustee.ietf.org/license-info for details.
Index ¶
Constants ¶
View Source
const URI jmap.URI = "urn:ietf:params:jmap:mdn"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capability ¶
type Capability struct{}
The MDN Capability
func (*Capability) New ¶
func (m *Capability) New() jmap.Capability
func (*Capability) URI ¶
func (m *Capability) URI() jmap.URI
type Disposition ¶
type Disposition struct {
// This MUST be one of the following strings:
// - "manual-action"
// - "automatic-action"
ActionMode string `json:"actionMode,omitempty"`
// This MUST be one of the following strings:
// - "mdn-sent-manually"
// - "mdn-sent-automatically"
SendingMode string `json:"sendingMode,omitempty"`
// This MUST be one of the following strings:
// - "deleted"
// - "dispatched"
// - "displayed"
// - "processed"
Type string `json:"type,omitempty"`
}
type MDN ¶
type MDN struct {
// The Email ID of the received message to which this MDN is related
ForEmailID jmap.ID `json:"forEmailId,omitempty"`
// The Subject of the MDN
Subject string `json:"subject,omitempty"`
// The human-readable part of the MDN, as plain text
TextBody string `json:"textBody,omitempty"`
// If true, the content of the original message will appear in the third
// component of the multipart/report generated for the MDN
IncludeOriginalmessage bool `json:"includeOriginalMessage,omitempty"`
// The name of the Mail User Agent (MUA) creating this MDN
ReportingUA string `json:"reportinUA,omitempty"`
// The object containing the diverse MDN disposition options
Disposition *Disposition `json:"disposition,omitempty"`
// The name of the gateway or MTA that translated a foreign
// (non-internet) MDN into this MDN
//
// server-set
MDNGateway string `json:"mdnGateway,omitempty"`
// The original recipient address specified by the sender of the message
// which the MDN is for
//
// server-set
OriginalRecipient string `json:"originalRecipient,omitempty"`
// The recipient for which the MDN is issued
//
// server-set
FinalRecipient string `json:"finalRecipient,omitempty"`
// The "Message-ID" header field of the message this MDN is for
//
// server-set
OriginalMessageID string `json:"originalMessageId,omitempty"`
// Additional information in the form of text messages when the "error"
// disposition modifier appears
//
// server-set
Error []string `json:"error,omitempty"`
// The object where keys are extension-field names and values are
// extension-field values
ExtensionFields map[string]string `json:"extensionFields,omitempty"`
}
A Message Delivery Notification (MDN) object
type Parse ¶
type Parse struct {
// The id of the account to use.
Account jmap.ID `json:"accountId,omitempty"`
// The IDs of blobs to parse as MDNs
BlobIDs []jmap.ID `json:"blobIds,omitempty"`
}
Sends an RFC5322 message from an MDN object
type ParseResponse ¶
type ParseResponse struct {
// The id of the account used for the call.
Account jmap.ID `json:"accountId,omitempty"`
// A map of the blob ID to the MDN resulting from the parse
Parsed map[jmap.ID]*MDN `json:"parsed,omitempty"`
// A list blob IDs that could not be parsed as MDNs
NotParsable []jmap.ID `json:"notParsable,omitempty"`
// A list of blob IDs that couldn't be found
NotFound []jmap.ID `json:"notFound,omitempty"`
}
type Send ¶
type Send struct {
// The id of the account to use.
Account jmap.ID `json:"accountId,omitempty"`
// The ID of the Identity to associate with these MDNs
IdentityID jmap.ID `json:"identityId,omitempty"`
// A map of client-specified creation ID to MDN object
Send map[jmap.ID]*MDN `json:"send,omitempty"`
// A map of the ID to a patch of update the Email object referenced by
// MDN/send, if the sending succeeds. The ID will always be a backward
// reference to the creation ids
OnSuccessUpdateEmail map[jmap.ID]*jmap.Patch `json:"onSuccessUpdateEmail,omitempty"`
}
Sends an RFC5322 message from an MDN object
type SendResponse ¶
type SendResponse struct {
// The id of the account used for the call.
Account jmap.ID `json:"accountId,omitempty"`
// A map of the creation ID to an MDN containing any properties that
// were not set by the client
Sent map[jmap.ID]*MDN `json:"sent,omitempty"`
// A map of creation ID to a SetError for each MDN not sent
NotSent map[jmap.ID]*jmap.SetError `json:"notSent,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.