/** * @author Ethan Knez **/ private void ThisAddIn_Startup(object sender, EventArgs e) { // For Windows 7 and later ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; // Create and set credentials for both classifiers _subClassifier = new NaturalLanguageClassifierService(); _subClassifier.SetCredential(subUsername, subPassword); _bodyClassifier = new NaturalLanguageClassifierService(); _bodyClassifier.SetCredential(bodyUsername, bodyPassword); EnsureFolderExists("WatsonSpam"); this.Application.NewMail += new Outlook.ApplicationEvents_11_NewMailEventHandler(NewMailMethod); }