/// <summary> /// Retrieves the extended mail message. /// </summary> /// <param name="item">The item.</param> /// <returns></returns> public SidePOPMailMessage RetrieveExtendedMailMessage(Pop3ListItemResult item) { SidePOPMailMessage message = RetrieveMimeEntity(item).ToMailMessageEx(); message.MessageNumber = item.MessageId; return(message); }
/// <summary> /// Executes the POP3 DELE command. /// </summary> /// <param name="item">The item.</param> /// /// <exception cref="Pop3Exception">If the DELE command was unable to be executed successfully.</exception> public void Delete(Pop3ListItemResult item) { if (item == null) { throw new ArgumentNullException("item"); } using (DeleteCommand command = new DeleteCommand(_clientStream, item.MessageId)) { ExecuteCommand <Pop3Response, DeleteCommand>(command); } }
/// <summary> /// Retrieves the specified message. /// </summary> /// <param name="item">The item.</param> /// <returns>A MimeEntity for the requested Pop3 Mail Item.</returns> public byte[] Retrieve(Pop3ListItemResult item) { if (item == null) { throw new ArgumentNullException("item"); } if (item.MessageId < 1) { throw new ArgumentOutOfRangeException(string.Format("{0}", item.MessageId)); } RetrieveResponse response; using (RetrieveCommand command = new RetrieveCommand(_clientStream, item.MessageId)) { response = ExecuteCommand <RetrieveResponse, RetrieveCommand>(command); } return(response.RawBytes); }
/// <summary> /// Retrieves the specified message. /// </summary> /// <param name="item">The item.</param> /// <returns>A MimeEntity for the requested Pop3 Mail Item.</returns> public MimeEntity RetrieveMimeEntity(Pop3ListItemResult item) { byte[] rawBytes = Retrieve(item); return(MimeEntity.CreateFrom(rawBytes, false)); }