Assigns the license key.
A string value which contains the license key which unlocks the component. This property is write-only.
You can unlock MailBee.NET Objects by either setting this property to the valid permanent or trial license key or by adding MailBee.Global.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 using any static methods creating any instances of Global class.
| Exception Type | Condition |
|---|---|
| MailBeeLicenseException | The license key is invalid. |
Setting this property and creating instances of all licensed classes.
[C#] // To use the code below, import MailBee namespaces at the top of your code using MailBee.AntiSpam; using MailBee.ImapMail; using MailBee.Outlook; using MailBee.Pdf; using MailBee.Pop3Mail; using MailBee.Security; using MailBee.SmtpMail; // The actual code (put it into a method of your class) MailBee.Global.LicenseKey = "Permanent or trial license key here"; BayesFilter filter = new BayesFilter(); Imap imp = new Imap(); MsgConvert conv_msg = new MsgConvert(); PstReader reader = new PstReader(@"C:\OutlookMessageBase\Outlook.pst"); HtmlToPdf conv_pdf = new HtmlToPdf(); Pop3 pop = new Pop3(); Smime sm = new Smime(); Smtp mailer = new Smtp();
[Visual Basic] ' To use the code below, import MailBee namespaces at the top of your code Imports MailBee.AntiSpam Imports MailBee.ImapMail Imports MailBee.Outlook Imports MailBee.Pdf Imports MailBee.Pop3Mail Imports MailBee.Security Imports MailBee.SmtpMail ' The actual code (put it into a method of your class) MailBee.Global.LicenseKey = "Permanent or trial license key here" Dim filter As New BayesFilter Dim imp As New Imap Dim conv_msg As New MsgConvert Dim reader As New PstReader("C:\OutlookMessageBase\Outlook.pst") Dim conv_pdf As New HtmlToPdf Dim pop As New Pop3 Dim sm As New Smime Dim mailer = New SmtpSetting the license key in the config file and creating instances of all licensed classes.
[C#] // To use the code below, import MailBee namespaces at the top of your code using MailBee.AntiSpam; using MailBee.ImapMail; using MailBee.Outlook; using MailBee.Pdf; using MailBee.Pop3Mail; using MailBee.Security; using MailBee.SmtpMail; // The actual code (put it into a method of your class) BayesFilter filter = new BayesFilter(); Imap imp = new Imap(); MsgConvert conv_msg = new MsgConvert(); PstReader reader = new PstReader(@"C:\OutlookMessageBase\Outlook.pst"); HtmlToPdf conv_pdf = new HtmlToPdf(); Pop3 pop = new Pop3(); Smime sm = new Smime(); Smtp mailer = new Smtp(); // XML config file (app.config, web.config, or machine.config): <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="MailBee.Global.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.AntiSpam Imports MailBee.ImapMail Imports MailBee.Outlook Imports MailBee.Pdf Imports MailBee.Pop3Mail Imports MailBee.Security Imports MailBee.SmtpMail ' The actual code (put it into a method of your class) Dim filter As New BayesFilter Dim imp As New Imap Dim conv_msg As New MsgConvert Dim reader As New PstReader("C:\OutlookMessageBase\Outlook.pst") Dim conv_pdf As New HtmlToPdf Dim pop As New Pop3 Dim sm As New Smime Dim mailer = New Smtp ' XML config file (app.config, web.config, or machine.config): <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="MailBee.Global.LicenseKey" value="Permanent or trial license key here"/> </appSettings> </configuration> ' In .NET 2.0, it can be <applicationSettings> instead of <appSettings>.
Global Class | MailBee Namespace