From 14d4d9faea6842e8654086fd7bb87f21821bf193 Mon Sep 17 00:00:00 2001 From: Filip Andersen <202408619@post.au.dk> Date: Wed, 4 Mar 2026 09:38:59 +0100 Subject: [PATCH] Added Add overwriter in HeaderCollection --- src/Postmark/Model/HeaderCollection.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Postmark/Model/HeaderCollection.cs b/src/Postmark/Model/HeaderCollection.cs index df1d66a..bd9d731 100644 --- a/src/Postmark/Model/HeaderCollection.cs +++ b/src/Postmark/Model/HeaderCollection.cs @@ -35,6 +35,12 @@ public HeaderCollection(IEnumerable nameValues = null) } } + // Enables collection initializer syntax: Headers = new HeaderCollection { {"key","value"} } + public void Add(string name, string value) + { + this.Add(new MailHeader(name, value)); + } + /// /// Get the names associated with this collection. This property does not cache /// its results, so be aware that iterating over it multiple times will iterate over