Esempio n. 1
0
        public static void SendMail(SOSIMCardEntity entity, SendMailCallback callback, OnSendMailExceptionHandle onException)
        {
            if (entity == null)
            {
                return;
            }
            OnSendingMailArgs args = new OnSendingMailArgs {
                SIMCardEntity = entity
            };

            try
            {
                MailBodyV31 mailBodyV31 = new Utility.Email.DataContracts.MailBodyV31();
                mailBodyV31.Body = CreateMailBody(entity);
                MailHelper.SendMail2IPP3Internal(mailBodyV31);
                if (callback != null)
                {
                    callback(args);
                }
            }
            catch (Exception ex)
            {
                if (onException != null)
                {
                    onException(ex, args);
                }
            }
        }
Esempio n. 2
0
        private static void OnSendMailExceptionHandle(Exception ex, OnSendingMailArgs args)
        {
            Index++;
            string mes = string.Format("SO#_{0}SIM卡激活提醒邮件发送失败", args.SIMCardEntity.SOSysNo);

            ExceptionHelper.HandleException(ex, string.Format("联通合约机{0}", mes), new object[] { args.SIMCardEntity.SOSysNo });
            Console.WriteLine(mes);
            Console.WriteLine(ex.Message);
            Console.WriteLine(ex.StackTrace);
            EndJOB();
        }
Esempio n. 3
0
 private static void OnSendMailCallback(OnSendingMailArgs args)
 {
     Index++;
     Console.WriteLine("SO#_{0}SIM卡激活提醒邮件已发送", args.SIMCardEntity.SOSysNo);
     EndJOB();
 }