Ejemplo n.º 1
0
 public static hMailServer.IInterfaceDomain GetDomain(string address)
 {
     string[]           tempaddress = address.Split((new char[] { '@' }));
     hMailServer.Domain domain      = MailApplication.GetEntity().Domains.get_ItemByName(tempaddress[1]);
     if (domain == null)
     {
         throw new MessageException()
               {
                   message = tempaddress[1] + "错误,无此邮箱"
               };
     }
     return(domain);
 }
Ejemplo n.º 2
0
        static void Main(string[] arg)
        {
            string url = "https://192.168.1.120/EWS/[email protected] ";

            string[]        args        = { "-url", url, "-username", "xhXH159519", "-password", "xhXH159519", "-GetMail", "收件箱\\inbox2" };
            string[]        args1       = { "-url", url, "-username", "xhXH159519", "-password", "xhXH159519", "-GetMail", "ALL" };
            string[]        args2       = { "-url", url, "-username", "xhXH159519", "-password", "xhXH159519", "-help" };
            string[]        args3       = { "-url", url, "-username", "xhXH159519", "-password", "xhXH159519", "-Time", "2017/07/17" };
            string[]        args4       = { "-url", url, "-username", "xhXH159519", "-password", "xhXH159519", "-Time", "2017/08/17" };
            MailApplication application = new MailApplication(args3);
            CommandEnum     command     = application.CommandEnumration;
            string          output      = application.getWay(command, args3, application.ishash(args3));

            Console.WriteLine(output);
        }