Documentation ¶
Overview ¶
Package dsn contains the utilities used for dsn message (DSN) generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDSN ¶
func GenerateDSN(utf8 bool, envelope Envelope, mtaInfo ReportingMTAInfo, rcptsInfo []RecipientInfo, failedHeader textproto.Header, outWriter io.Writer) (textproto.Header, error)
GenerateDSN is a top-level function that should be used for generation of the DSNs.
DSN header will be returned, body itself will be written to outWriter.
Types ¶
type RecipientInfo ¶
type ReportingMTAInfo ¶
type ReportingMTAInfo struct { ReportingMTA string ReceivedFromMTA string // Message sender address, included as 'X-Maddy-Sender: rfc822; ADDR' field. XSender string // Message identifier, included as 'X-Maddy-MsgId: MSGID' field. XMessageID string // Time when message was enqueued for delivery by Reporting MTA. ArrivalDate time.Time // Time when message delivery was attempted last time. LastAttemptDate time.Time }
Click to show internal directories.
Click to hide internal directories.