public bool SendThroughWebService() { try { EmailWS.EmailServer oService = new EmailWS.EmailServer(); EmailWS.Email oInfo = new EmailWS.Email(); oInfo.From = base.From; oInfo.To = base.To; oInfo.Subject = base.Subject; oInfo.Body = base.Body; oInfo.NPriority = MailPriority.Low.ToString(); string password = ConfigurationSettings.AppSettings["ServicePassword"].ToString(); return oService.SendEmail(oInfo, password); } catch (Exception exception) { string message = exception.Message; return false; } }
/// <remarks/> public void SendEmailAsync(Email oInfo, string password) { this.SendEmailAsync(oInfo, password, null); }
/// <remarks/> public void SendEmailAsync(Email oInfo, string password, object userState) { if ((this.SendEmailOperationCompleted == null)) { this.SendEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendEmailOperationCompleted); } this.InvokeAsync("SendEmail", new object[] { oInfo, password}, this.SendEmailOperationCompleted, userState); }
public bool SendEmail(Email oInfo, string password) { object[] results = this.Invoke("SendEmail", new object[] { oInfo, password}); return ((bool)(results[0])); }