/// 非同期で指定したMailIndexのメールデータの文字列を取得します。 /// <summary> /// Get mail text of specified mail index by asynchronous request. /// 非同期で指定したMailIndexのメールデータの文字列を取得します。 /// </summary> /// <param name="mailIndex"></param> /// <param name="callbackFunction"></param> public void GetMessageText(Int64 mailIndex, Action <Pop3CommandResult> callbackFunction) { RetrCommand cm = null; var md = callbackFunction; this.CheckAuthenticate(); cm = new RetrCommand(mailIndex); this.BeginExecute(cm, md); }
/// 指定したMailIndexのメールデータを取得します。 /// <summary> /// Get mail data of specified mail index. /// 指定したMailIndexのメールデータを取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public MailMessage GetMessage(Int64 mailIndex) { this.CheckAuthenticate(); var cm = new RetrCommand(mailIndex); this.Send(cm.GetCommandString()); this.Commnicating = true; var str = new MemoryStream(); this.GetResponse(str, true); str.Position = 0; return(this.MimeParser.ToMailMessage(str)); }
/// 指定したMailIndexのメールデータを取得します。 /// <summary> /// Get mail data of specified mail index. /// 指定したMailIndexのメールデータを取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public Byte[] GetMessageData(Int64 mailIndex) { this.CheckAuthenticate(); var cm = new RetrCommand(mailIndex); this.Send(cm.GetCommandString()); this.Commnicating = true; var str = new MemoryStream(); this.GetResponse(str, true); str.Position = 0; return(str.ToArray()); }
/// 非同期でPOP3メールサーバーへRETRコマンドを送信します。 /// <summary> /// Send asynchronous retr command to pop3 server. /// 非同期でPOP3メールサーバーへRETRコマンドを送信します。 /// </summary> /// <param name="mailIndex"></param> /// <param name="callbackFunction"></param> public void ExecuteRetr(Int64 mailIndex, Action <MailMessage> callbackFunction) { RetrCommand cm = null; Action <String> md = responseString => { this.CheckResponseError(responseString); callbackFunction(new MailMessage(responseString, mailIndex)); }; this.CheckAuthenticate(); cm = new RetrCommand(mailIndex); this.BeginExecute(cm, md); }
/// 指定したMailIndexのメールデータの文字列を本文の行数を指定してストリームに出力します。 /// <summary> /// Get mail text of specified mail index with indicate body line count. /// 指定したMailIndexのメールデータの文字列を本文の行数を指定してストリームに出力します。 /// </summary> /// <param name="stream"></param> /// <param name="mailIndex"></param> /// <returns></returns> public void GetMessageText(Stream stream, Int64 mailIndex) { RetrCommand cm = null; this.CheckAuthenticate(); try { cm = new RetrCommand(mailIndex); this.Execute(stream, cm); } catch (Exception ex) { throw new MailClientException(ex); } }
/// 指定したMailIndexのメールデータの文字列を取得します。 /// <summary> /// Get mail text of specified mail index. /// 指定したMailIndexのメールデータの文字列を取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public String GetMessageText(Int64 mailIndex) { RetrCommand cm = null; this.CheckAuthenticate(); try { cm = new RetrCommand(mailIndex); return(this.Execute(cm)); } catch (Exception ex) { throw new MailClientException(ex); } }
/// 非同期でPOP3メールサーバーへRETRコマンドを送信します。 /// <summary> /// Send asynchronous retr command to pop3 server. /// 非同期でPOP3メールサーバーへRETRコマンドを送信します。 /// </summary> /// <param name="mailIndex"></param> /// <param name="callbackFunction"></param> public void ExecuteRetr(Int64 mailIndex, Action <MailMessage> callbackFunction) { RetrCommand cm = null; Action <Pop3CommandResult> md = response => { this.CheckResponseError(response); this.MimeParser.Encoding = this.ResponseEncoding; var mg = this.MimeParser.ToMailMessage(response.Text); callbackFunction(mg); }; this.CheckAuthenticate(); cm = new RetrCommand(mailIndex); this.BeginExecute(cm, md); }
/// 非同期で指定したMailIndexのメールデータの文字列を取得します。 /// <summary> /// Get mail text of specified mail index by asynchronous request. /// 非同期で指定したMailIndexのメールデータの文字列を取得します。 /// </summary> /// <param name="mailIndex"></param> /// <param name="callbackFunction"></param> public void GetMessageText(Int64 mailIndex, Action<Pop3CommandResult> callbackFunction) { RetrCommand cm = null; var md = callbackFunction; this.CheckAuthenticate(); cm = new RetrCommand(mailIndex); this.BeginExecute(cm, md); }
/// 指定したMailIndexのメールデータの文字列を取得します。 /// <summary> /// Get mail text of specified mail index. /// 指定したMailIndexのメールデータの文字列を取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public String GetMessageText(Int64 mailIndex) { RetrCommand cm = null; this.CheckAuthenticate(); try { cm = new RetrCommand(mailIndex); var rs = this.Execute(cm); return rs.Text; } catch (Exception ex) { throw new MailClientException(ex); } }
/// 指定したMailIndexのメールデータを取得します。 /// <summary> /// Get mail data of specified mail index. /// 指定したMailIndexのメールデータを取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public Byte[] GetMessageData(Int64 mailIndex) { this.CheckAuthenticate(); var cm = new RetrCommand(mailIndex); this.Send(cm.GetCommandString()); this.Commnicating = true; var str = new MemoryStream(); this.GetResponse(str, true); str.Position = 0; return str.ToArray(); }
/// 非同期で指定したMailIndexのメールデータを取得します。 /// <summary> /// Get mail data by asynchronous request. /// 非同期で指定したMailIndexのメールデータを取得します。 /// </summary> /// <param name="mailIndex"></param> /// <param name="callbackFunction"></param> public void GetMessage(Int64 mailIndex, Action<MailMessage> callbackFunction) { RetrCommand cm = null; Action<Pop3CommandResult> md = response => { this.CheckResponseError(response); this.MimeParser.Encoding = this.ResponseEncoding; var mg = this.MimeParser.ToMailMessage(response.Text); callbackFunction(mg); }; this.CheckAuthenticate(); cm = new RetrCommand(mailIndex); this.BeginExecute(cm, md); }
/// 指定したMailIndexのメールデータを取得します。 /// <summary> /// Get mail data of specified mail index. /// 指定したMailIndexのメールデータを取得します。 /// </summary> /// <param name="mailIndex"></param> /// <returns></returns> public MailMessage GetMessage(Int64 mailIndex) { this.CheckAuthenticate(); var cm = new RetrCommand(mailIndex); this.Send(cm.GetCommandString()); this.Commnicating = true; var str = new MemoryStream(); this.GetResponse(str, true); str.Position = 0; return this.MimeParser.ToMailMessage(str); }