Code Monkey home page Code Monkey logo

Comments (4)

jstedfast avatar jstedfast commented on June 10, 2024

Why is client.Disconnect(true) outside of the using block?

Why are you using inbox.OpenAsync() but all other methods you call the sync API?

The AddFlags() and Expunge() should delete the message. If they don't, I'll need a protocol log to diagnose the issue.

from mailkit.

louisoft88 avatar louisoft88 commented on June 10, 2024

Thanks for the very quick reply.

(Congratulations! MailKit is an excellent tool!!!)

Async: I could not delete the message so I tried everything. THanks for notify me.

Explunge(): Typo, sorry I just wanted to make the code more readable.

I attached a log file, when I wanted to delete a message.

When I delete a message then it disappears from my email list on the screen (I remove it) but getting messages next time shows the "deleted" message again. I checked it with my webmail app. The "deleted"
ImapLog.txt
file was not deleted.

Many thanks,
Louis

from mailkit.

jstedfast avatar jstedfast commented on June 10, 2024

@louisoft88 it looks like it worked based on the logs:

C: C00000006 STORE 1 +FLAGS (\Deleted)
S: * 1 FETCH (FLAGS ($IsMailingList \DELETED) UID 2277)
S: C00000006 OK STORE Command Completed
C: C00000007 EXPUNGE
S: * 1 EXPUNGE
S: C00000007 OK EXPUNGE completed
C: C00000008 LOGOUT

And then you connect to the same server again, open the inbox, and have 0 messages just as expected:

D00000005 SELECT INBOX
S: * FLAGS (\Deleted \Seen \Answered \Flagged \Draft $Forwarded $IsMailingList)
S: * 0 EXISTS
S: * 0 RECENT
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft $Forwarded $IsMailingList)]
S: * OK [UIDNEXT 83]
S: * OK [UIDVALIDITY 1696508062] UIDs valid
S: D00000005 OK [READ-WRITE] SELECT completed
C: D00000006 LOGOUT
S: * BYE IMAP4rev1 server terminating connection
S: D00000006 OK LOGOUT Initiated

from mailkit.

louisoft88 avatar louisoft88 commented on June 10, 2024

Thanks, it works now, it was my fault. I am sorry about this issue.
Louis

from mailkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.