Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
 /// <remarks/>
 public void SendEmailAsync(Email oInfo, string password) {
     this.SendEmailAsync(oInfo, password, null);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 public bool SendEmail(Email oInfo, string password) {
     object[] results = this.Invoke("SendEmail", new object[] {
                 oInfo,
                 password});
     return ((bool)(results[0]));
 }