v0.2.7: MDNs and DSNs #48
wneessen
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This release adds support for requesting MDNs (RFC 8098) and DSNs (RFC 1891) to be delivered for outgoing mail messages. We've also added more test coverage.
MDNs
MDNs (Message Disposition Notification) allows you to request a - what is often referred to as - "read receipt". This is implemented via a message header and it's up the the recipients MUA to send out this notification to the sender.
Code example:
For MDNs we implement the same methods as for the
Tomethods:RequestMDNToRequestMDNToFormatRequestMDNAddToRequestMDNAddToFormatDSNs
DSNs (Delivery Status Notification) are an extension to the SMTP protocol and need to be supported by the sending server. The RFC for DSNs defines different parameters of which we've implemented the once which we think make most sense for go-mail:
RETextension for theMAIL FROMcommand, to let the user specify if a DSN should contain the full mail (FULL) or only headers (HDRS) of the sent mail.NOTIFYextension that allows the user to request a DSN for the different types of allowed situations:NEVER,SUCCESS,FAILUREandDELAYENVIDandORCPTare currently not supported but might follow in a later relaese (please open an issue if you see usefulness in this).Since DSNs are part of the SMTP protocol, these need to be enabled on the
Client. We've added 3 ways to do so:WithDSN: Which enables DSNs, sets theFULLMail From Return Option and theSUCCESSandFAILURERecipient Notify OptionsWithDSNMailReturnType: which enables DSNs and allows the user to specify which type of Mail From Return Option is wantedWithDSNRcptNotifyType: which enables DSNs and allows the user to specify which types of Recipient Notify Options are wantedCode example:
Noteworthy changes
This discussion was created from the release v0.2.7: MDNs and DSNs.
Beta Was this translation helpful? Give feedback.
All reactions