
## SetLicense (1 of 3) {#setlicense_1}

Licenses the component.

**Returns:** void Aspose::Email::

```cpp
SetLicense(System::SharedPtr < System::IO::FileInfo > licenseFile)
```

| Parameter | Description |
| --- | --- |
| licenseFile | File of license System::IO::FileInfo . |

---

## SetLicense (2 of 3) {#setlicense_2}

Licenses the component.

**Returns:** void Aspose::Email::

```cpp
SetLicense(System::SharedPtr < System::IO::Stream > stream)
```

| Parameter | Description |
| --- | --- |
| stream | A stream that contains the license. |

---

## SetLicense (3 of 3) {#setlicense_3}

Licenses the component.

**Returns:** void Aspose::Email::

```cpp
SetLicense(System::String licenseName)
```

| Parameter | Description |
| --- | --- |
| licenseName | Can be a full or short file name<ms> or name of an embedded resource</ms>. Use an empty string to switch to evaluation mode. |

