public bool SendEmail() { try { BeholdEmailer tabemailer = this.CreateBeholdEmailerFromConfig(); Watermarker wm = this.CreateWatermarkerFromConfig(); try { bool result; result = tabemailer.GenerateEmailFromView(Configurator.GetConfig("email_sender"), new string[1] { testEmailRecipient.Text }, new string[0] { }, new string[0] { }, testEmailSubject.Text, "Please see attached Tableau file", singleUsernameForImpersonation.Text, singleViewLocation.Text, "fullpdf", new Dictionary <String, String>(), wm); return(result); } catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } } // From Repository Failing catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } }
public bool SendEmail(string site, string[] emailTo, string[] emailCc, string[] emailBcc, string emailSubject, string usernameForImpersonation, string viewLocation, Dictionary <String, String> viewFiltersMap, string attachmentContentType) { try { BeholdEmailer tabemailer = this.CreateBeholdEmailerFromConfig(site); Watermarker wm = this.CreateWatermarkerFromConfig(); try { bool result; this.Logger.Log("Fixin' to send the e-mail"); result = tabemailer.GenerateEmailFromView(Configurator.GetConfig("email_sender"), emailTo, emailCc, emailBcc, emailSubject, "Please see attached Tableau file", usernameForImpersonation, viewLocation, attachmentContentType.ToLower(), viewFiltersMap, wm); return(result); } catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } } // From Repository Failing catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } }
public bool SendEmail(string scheduleName) { try { BeholdEmailer tabemailer = this.CreateBeholdEmailerFromConfig(); Watermarker wm = this.CreateWatermarkerFromConfig(); try { bool result; if (scheduleName != "") { tabemailer.ExportArchiveFolderPath = Configurator.GetConfig("export_archive_folder"); result = tabemailer.GenerateEmailsFromNamedScheduleInRepository(scheduleName, Configurator.GetConfig("email_sender"), wm); } else { result = tabemailer.GenerateEmailFromView(Configurator.GetConfig("email_sender"), new string[1] { testEmailRecipient.Text }, new string[0] { }, new string[0] { }, testEmailSubject.Text, "Please see attached file", singleUsernameForImpersonation.Text, singleViewLocation.Text, ExportTypeIndexMap[Int32.Parse(Configurator.GetConfig("single_export_type_index"))], new Dictionary <String, String>(), wm); } return(result); } catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } } // From Repository Failing catch (ConfigurationException ce) { this.Logger.Log(ce.Message); return(false); } }