Example #1
0
        /// 指定したMailIndexのメールをメールサーバーから削除します。
        /// <summary>
        /// Set delete flag to specify mail index.
        /// To complete delete execution,call quit command after calling dele command.
        /// 指定したMailIndexのメールに削除フラグをたてます。
        /// 実際に削除するにはさらにQUITコマンドで削除処理を完了させる必要があります。
        /// </summary>
        /// <param name="mailIndex"></param>
        /// <returns></returns>
        public Boolean DeleteEMail(params Int64[] mailIndex)
        {
            DeleCommand cm = null;
            String      s  = "";

            if (this.EnsureOpen() == Pop3ConnectionState.Disconnected)
            {
                return(false);
            }
            if (this.Authenticate() == false)
            {
                return(false);
            }
            for (int i = 0; i < mailIndex.Length; i++)
            {
                cm = new DeleCommand(mailIndex[i]);
                s  = this.Execute(cm);
                if (MailParser.IsResponseOk(s) == false)
                {
                    return(false);
                }
            }
            this.ExecuteQuit();
            return(true);
        }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="text"></param>
 public Pop3CommandResult(String text)
 {
     this._Ok   = MailParser.IsResponseOk(text);
     this._Text = text;
 }