当前位置: 首页>>代码示例>>C#>>正文


C# ASObject.getBoolean方法代码示例

本文整理汇总了C#中ASObject.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# ASObject.getBoolean方法的具体用法?C# ASObject.getBoolean怎么用?C# ASObject.getBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ASObject的用法示例。


在下文中一共展示了ASObject.getBoolean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: send

        /// <summary>
        /// 发送邮件
        /// </summary>
        /// <param name="mm">邮件对象</param>
        /// <param name="from">发送人</param>
        /// <param name="to">接收人</param>
        private void send(Mail_Message mm, ASObject from, string[] to)
        {
            using (MemoryStreamEx stream = new MemoryStreamEx(32000))
            {
                MIME_Encoding_EncodedWord headerwordEncoder = new MIME_Encoding_EncodedWord(MIME_EncodedWordEncoding.Q, Encoding.UTF8);
                mm.ToStream(stream, headerwordEncoder, Encoding.UTF8);
                stream.Position = 0;

                SMTP_Client.QuickSendSmartHost(null, from.getString("send_address", "stmp.sina.com"), from.getInt("send_port", 25),
                    from.getBoolean("is_send_ssl", false), from.getString("account"), PassUtil.Decrypt(from.getString("password")),
                    from.getString("account"), to, stream);
            }
        }
开发者ID:nbhopson,项目名称:QMail,代码行数:19,代码来源:MailSendWorker.cs

示例2: sendReceiptMail

        /// <summary>
        /// 发送阅读回折邮件
        /// </summary>
        /// <param name="sHtmlText">邮件内容</param>
        /// <param name="from">发送人</param>
        /// <param name="to">接收人</param>
        public void sendReceiptMail(string sHtmlText, string subject, ASObject from, string[] to)
        {
            using (MemoryStreamEx stream = new MemoryStreamEx(32000))
            {
                Mail_Message m = new Mail_Message();
                m.MimeVersion = "1.0";
                m.Date = DateTime.Now;
                m.MessageID = MIME_Utils.CreateMessageID();

                m.Subject = subject;
                StringBuilder sb = new StringBuilder();
                foreach (string p in to)
                {
                    if (sb.Length > 0)
                        sb.Append(",");
                    sb.Append(p);
                }
                m.To = Mail_t_AddressList.Parse(sb.ToString());

                //--- multipart/alternative -----------------------------------------------------------------------------------------
                MIME_h_ContentType contentType_multipartAlternative = new MIME_h_ContentType(MIME_MediaTypes.Multipart.alternative);
                contentType_multipartAlternative.Param_Boundary = Guid.NewGuid().ToString().Replace('-', '.');
                MIME_b_MultipartAlternative multipartAlternative = new MIME_b_MultipartAlternative(contentType_multipartAlternative);
                m.Body = multipartAlternative;

                //--- text/plain ----------------------------------------------------------------------------------------------------
                MIME_Entity entity_text_plain = new MIME_Entity();
                MIME_b_Text text_plain = new MIME_b_Text(MIME_MediaTypes.Text.plain);
                entity_text_plain.Body = text_plain;
                text_plain.SetText(MIME_TransferEncodings.QuotedPrintable, Encoding.UTF8, sHtmlText);
                multipartAlternative.BodyParts.Add(entity_text_plain);

                //--- text/html ------------------------------------------------------------------------------------------------------
                MIME_Entity entity_text_html = new MIME_Entity();
                MIME_b_Text text_html = new MIME_b_Text(MIME_MediaTypes.Text.html);
                entity_text_html.Body = text_html;
                text_html.SetText(MIME_TransferEncodings.QuotedPrintable, Encoding.UTF8, sHtmlText);
                multipartAlternative.BodyParts.Add(entity_text_html);

                MIME_Encoding_EncodedWord headerwordEncoder = new MIME_Encoding_EncodedWord(MIME_EncodedWordEncoding.Q, Encoding.UTF8);
                m.ToStream(stream, headerwordEncoder, Encoding.UTF8);
                stream.Position = 0;

                SMTP_Client.QuickSendSmartHost(null, from.getString("send_address", "stmp.sina.com"), from.getInt("send_port", 25),
                    from.getBoolean("is_send_ssl", false), from.getString("account"), PassUtil.Decrypt(from.getString("password")),
                    from.getString("account"), to, stream);
            }
        }
开发者ID:nbhopson,项目名称:QMail,代码行数:54,代码来源:MailWorker.cs

示例3: executeRecvMaill

        private void executeRecvMaill(ASObject ac, string pubId)
        {
            mailAccount = new MailAccount();

            mailAccount.pubId = pubId;
            mailAccount.account = ac.getString("account");
            mailAccount.name = ac.getString("name");
            mailAccount.recv_server = ac.getString("recv_address");
            mailAccount.recv_port = ac.getInt("recv_port");
            mailAccount.recv_type = (ac.getInt("recv_type") == 1 ? MailAccount.RECV_TYPE.POP3 : MailAccount.RECV_TYPE.IMAP);
            mailAccount.password = PassUtil.Decrypt(ac.getString("password"));
            mailAccount.recv_ssl = ac.getBoolean("is_recv_ssl");

            uids = new List<string>();
            /*
            DataSet ds = DBWorker.ExecuteQuery("select mail_uid from ML_Mail where mail_account = '" + mailAccount.account + "'");
            if (ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                foreach (DataRow row in dt.Rows)
                {
                    if (String.IsNullOrWhiteSpace(row[0] as string))
                        continue;
                    uids.Add((string)row[0]);
                }
            }*/
            //获取账户对应的所有UIDs
            object result = Remoting.call("MailManager.getMailAccountUids", new object[] { mailAccount.account });
            object[] record = result as object[];
            if (record != null && record.Length > 0)
            {
                foreach (object r in record)
                {
                    uids.Add(r as string);
                }
            }

            try
            {
                if (mailAccount.recv_type == MailAccount.RECV_TYPE.POP3)
                {
                    pop3RecvMail();
                }
                else if (mailAccount.recv_type == MailAccount.RECV_TYPE.IMAP)
                {
                    imapRecvMail();
                }

                if (hasError)
                    throw new Exception("邮件已全部接收完成,但至少有一封邮件发生错误,相关内容请查看详细信息。");
            }
            catch (Exception e)
            {
                throw e;
            }
        }
开发者ID:nbhopson,项目名称:QMail,代码行数:56,代码来源:MailReceiveWorker.cs


注:本文中的ASObject.getBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。