Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/Postmark/Model/HeaderCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public HeaderCollection(IEnumerable<MailHeader> nameValues = null)
}
}

// Enables collection initializer syntax: Headers = new HeaderCollection { {"key","value"} }
public void Add(string name, string value)
{
this.Add(new MailHeader(name, value));
}

/// <summary>
/// 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
Expand Down