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