Question Sending Email with Dotnet 8 and System.Net.Mail.MailMessage - Header definitions

M74

New member
Joined
Jan 8, 2025
Messages
1
Programming Experience
10+
Hello.

Sending emails with the System.Net.Mail.MailMessage class in my application iss working fine.

Now I'm searching for solutions to get notifications for
- Request a Delivery Receipt
- Request a Read Receipt
(The same you find in Outlook --> Options)


With Dotnet framework I found the solution to add a header for "Disposition-Notification-To" (=Message was read).
But I don't find the definition for a delivery request... Could you help me?
And asking in general, where do I find all possible header definitions?

Thank you for your help!
BR, M74
 
Last edited:
Not directly related to your question, but hopefully you are not using the obsolete SmtpClient with your MailMessage:

The SmtpClient class is used to send email to an SMTP server for delivery. The SMTP protocol is defined in RFC 2821, which is available at https://www.ietf.org.

Important
We don't recommend that you use the SmtpClient class for new development because SmtpClient doesn't support many modern protocols. Use MailKit or other libraries instead. For more information, see SmtpClient shouldn't be used on GitHub.
The SmtpClient class is obsolete in Xamarin. However:

  • It is included in the .NET Standard 2.0 and later versions and therefore must be part of any .NET implementation that supports those versions.
  • It is present and can be used in .NET Framework 4 through .NET Framework 4.8.
  • It is usable in .NET Core, but its use isn't recommended.

 
And asking in general, where do I find all possible header definitions?
Read the RFCs:

 
Back
Top Bottom