GlobalLicenseKey Property |
Namespace: MailBee
Exception | Condition |
---|---|
MailBeeLicenseException | The license key is invalid. |
You can unlock MailBee.NET Objects by 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. The 3rd method is to pass the license key as a parameter when calling a constructor which creates an instance of a component.
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.
// 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();
// 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>.