---
title: "HeaderCollection"
url: "https://reference.aspose.com/email/python-net/aspose.email.mime/headercollection/"
product: "Aspose.Email for Python via .NET API Reference"
---


## HeaderCollection class

Defines the collection of header fields

The HeaderCollection type exposes the following members:
## Constructors
| Name | Description |
| :- | :- |
|HeaderCollection(col)|Initializes a new instance of the HeaderCollection class|
|HeaderCollection()|Initializes a new instance of the [HeaderCollection](/email/python-net/aspose.email.mime/headercollection/) class.|
## Properties
| Name | Description |
| :- | :- |
|all_keys|Gets an array of strings containing all header keys in collections|
|keys|Gets a|
## Indexer
| Name | Description |
| :- | :- |
|[index]|Gets a value from collection by the index.|
## Methods
| Name | Description |
| :- | :- |
|get(index)|  |
|get(name)|  |
|add(c)|  |
|add(name, value)|  |
|get_key(index)|  |
|get_decoded_value(name)|  |
|get_values(name)|  |
|add_(name, value)|  |
|insert(name, value)|  |
|set(name, value)|  |
|has_keys()|  |

### See Also

* namespace [aspose.email.mime](/email/python-net/aspose.email.mime/)
* assembly [Aspose.Email](/email/python-net/)

