Пример #1
0
        public ResponseMessage SendEmail(string to, string cc, string bcc, string subject, string content)
        {
            WebUI.ServiceReferenceEmail.GeneralClient gc = new GeneralClient();
            WebUI.ServiceReferenceEmail.Message_Request mrequest = new Message_Request();
            WebUI.ServiceReferenceEmail.Message_Response mresponse = new Message_Response();
            WebUI.ServiceReferenceEmail.ResponseMessage rmessage = new ResponseMessage();

            mrequest.TypeMessage = "1";
            mrequest.To = to;
            mrequest.Cc = cc;
            mrequest.Bcc = bcc;
            mrequest.Subject = subject;
            mrequest.Content = content;
            mrequest.DatetimeCreated = DateTime.Now.ToString("yyyyMMddssmmHH");

            WebUI.ServiceReferenceEmail.Common_Request cr = new Common_Request();

            System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

            cr.UserName = "******";
            cr.Password = "******";
            mresponse = gc.Send_Message(cr, mrequest, out rmessage);

            return rmessage;
        }
Пример #2
0
        public ResponseMessage SendEmail(string to, string cc, string bcc, string subject, string content)
        {
            WebUI.ServiceReferenceEmail.GeneralClient    gc        = new GeneralClient();
            WebUI.ServiceReferenceEmail.Message_Request  mrequest  = new Message_Request();
            WebUI.ServiceReferenceEmail.Message_Response mresponse = new Message_Response();
            WebUI.ServiceReferenceEmail.ResponseMessage  rmessage  = new ResponseMessage();

            mrequest.TypeMessage     = "1";
            mrequest.To              = to;
            mrequest.Cc              = cc;
            mrequest.Bcc             = bcc;
            mrequest.Subject         = subject;
            mrequest.Content         = content;
            mrequest.DatetimeCreated = DateTime.Now.ToString("yyyyMMddssmmHH");

            WebUI.ServiceReferenceEmail.Common_Request cr = new Common_Request();

            System.Net.ServicePointManager.ServerCertificateValidationCallback = ((sender, certificate, chain, sslPolicyErrors) => true);

            cr.UserName = "******";
            cr.Password = "******";
            mresponse   = gc.Send_Message(cr, mrequest, out rmessage);

            return(rmessage);
        }