Assigns the license key.
A string value which contains the license key which unlocks Security Powerup. This property is write-only.
You can unlock Security Powerup by either setting this property to the valid permanent or trial license key or by adding MailBee.Security.Powerup.LicenseKey key in app.config, web.config, or machine.config file.
This property is static (Shared in Visual Basic). If not set in the config file, this property must be set before any method or property or constructor which may check it gets called.
| Exception Type | Condition |
|---|---|
| MailBeeLicenseException | The license key is invalid. |
Setting this property and creating an instance of Smime class.
[C#] // To use the code below, import MailBee namespaces at the top of your code using MailBee; using MailBee.Security; // The actual code (put it into a method of your class) Powerup.LicenseKey = "Permanent or trial license key here"; Smime sm = new Smime();
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code Imports MailBee Imports MailBee.Security ' The actual code (put it into a method of your class) Powerup.LicenseKey = "Permanent or trial license key here" Dim sm As New SmimeSetting the license key in the config file and creating an instance of Smime class.
[C#] // To use the code below, import MailBee namespaces at the top of your code using MailBee; using MailBee.Security; // The actual code (put it into a method of your class) Smime sm = new Smime(); // XML config file (app.config, web.config, or machine.config): <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="MailBee.Security.Powerup.LicenseKey" value="Permanent or trial license key here"/> </appSettings> </configuration> // In .NET 2.0, it can be <applicationSettings> instead of <appSettings>.
[Visual Basic] Imports MailBee Imports MailBee.Security ' The actual code (put it into a method of your class) Dim sm As New Smime ' XML config file (app.config, web.config, or machine.config): <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="MailBee.Security.Powerup.LicenseKey" value="Permanent or trial license key here"/> </appSettings> </configuration> ' In .NET 2.0, it can be <applicationSettings> instead of <appSettings>.
Powerup Class | MailBee.Security Namespace