private static SmtpSettings GetSettings() { if (currentSettings == null) { using (var dw = Application.Current.CreateDataWorkspace()) { MailSettings settings = dw.ApplicationData.MailSettingsSet.FirstOrDefault(); if (settings == null) { return(null); } currentSettings = new SmtpSettings(settings.SmtpServer, settings.Username, settings.Password, settings.SenderAddress, settings.Port); } } return(currentSettings); }
partial void MailSettingsSet_Updated(MailSettings entity) { SmtpSender.UpdateSettings(); }
partial void MailSettingsSet_Updated(MailSettings entity) { SmtpSender.UpdateSettings(); }