0

メッセージの添付ファイルをローカルのハード ドライブに保存する必要があります。これを達成するための回避策はありますか? S22.Imap dll を使用しています

using (ImapClient Client = new ImapClient("imap.gmail.com", 993,
            "xxxxxx@xxxxx.com", "xxxxxxxxxx", S22.Imap.AuthMethod.Login, true))
            {
                uint[] uids = Client.Search(
                    SearchCondition.From("test.account.rac@gmail.com").And(
                    SearchCondition.SentSince(new DateTime(2013, 5, 8))).And(
                    SearchCondition.SentBefore(new DateTime(2013, 5, 9)))
                );

                MailMessage[] messages = Client.GetMessages(uids,
                    (Bodypart part) =>
                    {
                        // We're only interested in attachments
                        if (part.Disposition.Type == ContentDispositionType.Attachment)
                        {
                            Int64 TwoMegabytes = (1024 * 1024 * 2);
                            if (part.Size > TwoMegabytes)
                            {
                                // Don't download this attachment
                                return false;
                            }
                        }

                        // fetch MIME part and include it in the returned MailMessage instance
                        return true;
                    }
                );
                string attachment_name;
                if (messages[0].Attachments.Count > 0)
                {




                }
            }

これらの添付ファイルをローカル ドライブに保存する組み込みの方法はありません。さらに、これは S22.Mail.dll ライブラリを介して達成できますが、このライブラリを見つけることができません。誰でも私に解決策を提供できますか? S22.Mail のソース コードhttps://github.com/smiley22/S22.Mailへのリンクは次のとおりです。

4

1 に答える 1