//Send Template Biz Mail private void Button_Click_1(object sender, RoutedEventArgs e) { var mail = new MailTemplateMessage(); mail.To = "*****@*****.**"; mail.CompanyCode = "1003"; mail.CountryCode = "USA"; mail.LanguageCode = "en-us"; mail.SystemID = "EGG0502009"; mail.TemplateID = "000005"; mail.DomainName = "Oversea"; mail.MailTemplateVariables = new List <MailTemplateVariable>(); mail.BusinessNumberList = new List <BusinessNumber>(); mail.BusinessNumberList.Add(new BusinessNumber() { NumberType = Core.Components.NumberType.ClaimNumber, NumberValue = "1" }); mail.BusinessNumberList.Add(new BusinessNumber() { NumberType = Core.Components.NumberType.CustomerNumber, NumberValue = "2" }); ComponentFactory.GetComponent <IMail>().SendBusinessMailByTemplate(mail, (result) => { if (result.IsSuccess) { this.Page.Window.MessageBox.Show("Send Successfully.", MessageBoxType.Success); } else { this.Page.Window.MessageBox.Show(result.Error, Silverlight.Controls.Components.MessageBoxType.Error); } }); }
public void OpenMailPageByTemplate(MailTemplateMessage message, MailPageSetting setting, Action <MailResult> callback) { var msg = new MailTemplatePageMessage { MailMessage = message, MailPageSetting = setting }; CPApplication.Current.Browser.LoadingSpin.Show(); LogMail(msg, (messageID) => { CPApplication.Current.Browser.LoadingSpin.Hide(); OpenPageInternal(messageID); if (callback != null) { if (this.m_timer != null) { this.m_timer.Start(); } lock (s_syncObj) { this.m_tasks.Add(new MailTask { MessageID = messageID, Action = callback, ProcessCount = 0 }); } } }); }
public void SendBusinessMailByTemplate(MailTemplateMessage message, Action <MailResult> callback) { m_restClient.Create <object>("SendBusinessEmail", message, (sender, args) => { if (callback != null) { var result = HandleException(args.Error); callback(result); } }); }
private void Button_Click_5(object sender, RoutedEventArgs e) { var mail = new MailTemplateMessage(); mail.To = "*****@*****.**"; mail.CompanyCode = "1003"; mail.CountryCode = "USA"; mail.LanguageCode = "en-us"; mail.SystemID = "EGG0502009"; mail.TemplateID = "000005"; mail.DomainName = "Oversea"; mail.MailTemplateVariables = new List <MailTemplateVariable>(); mail.MailTemplateVariables.Add(new MailTemplateVariable { Key = "#DV_CustomerName#", Value = "jimmy" }); this.Page.Window.Mailer.OpenMailPageByTemplate(mail, new MailPageSetting()); }
private void Button_Click_6(object sender, RoutedEventArgs e) { var mail = new MailTemplateMessage(); mail.To = "*****@*****.**"; mail.CompanyCode = "1003"; mail.CountryCode = "USA"; mail.LanguageCode = "en-us"; mail.SystemID = "EGG0502009"; mail.TemplateID = "000005"; mail.DomainName = "Oversea"; mail.MailTemplateVariables = new List <MailTemplateVariable>(); mail.MailTemplateVariables.Add(new MailTemplateVariable { Key = "#DV_CustomerName#", Value = "jimmy" }); this.Page.Window.Mailer.OpenMailPageByTemplate(mail, new MailPageSetting(), (result) => { CPApplication.Current.CurrentPage.Context.Window.MessageBox.Show(string.Format("Send Mail Completed, Result:{0}", result.IsSuccess)); }); }
//Open Template Mail Page private void Button_Click_3(object sender, RoutedEventArgs e) { var mail = new MailTemplateMessage(); mail.To = "*****@*****.**"; mail.CC = "*****@*****.**"; mail.BCC = "*****@*****.**"; mail.CompanyCode = "1003"; mail.CountryCode = "USA"; mail.LanguageCode = "en-us"; mail.SystemID = "EGG0502009"; mail.TemplateID = "000005"; mail.DomainName = "Oversea"; mail.MailTemplateVariables = new List <MailTemplateVariable>(); mail.MailTemplateVariables.Add(new MailTemplateVariable { Key = "#DV_CustomerName#", Value = "jimmy" }); mail.BusinessNumberList = new List <BusinessNumber>(); mail.BusinessNumberList.Add(new BusinessNumber() { NumberType = Core.Components.NumberType.ClaimNumber, NumberValue = "1" }); mail.BusinessNumberList.Add(new BusinessNumber() { NumberType = Core.Components.NumberType.CustomerNumber, NumberValue = "2" }); this.Page.Window.Mailer.OpenMailPageByTemplate(mail, new MailPageSetting { IsAllowAttachment = false, IsAllowCC = true, IsAllowEdit = false }); }
public void OpenMailPageByTemplate(MailTemplateMessage message, MailPageSetting setting) { this.OpenMailPageByTemplate(message, setting, null); }