Git Product home page Git Product logo

Comments (15)

jstedfast avatar jstedfast commented on August 15, 2024

Is this GMail? If so, once you add the Deleted flag, GMail moves the message to the Trash folder so client.Inbox.Expunge(...) won't do anything.

(Note: unless you change GMail's user Settings to make it behave like a normal IMAP server).

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

Yes this is gmail, the client i'm developing will be used for alot of IMAPs
What are your suggestions?

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

I don't know what can be done. You'll have to experiment. Maybe you can expunge the Trash folder.

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

I have tried expunging the Trash folder after moving it, still shows as a reply or a thread, I'm really confused and don't know where the problem is...

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

Does GMail support ImapCapabilities.Replace? If so, you can use client.Inbox.Replace() methods.

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

What is IReplaceRequest ? How to use this inside this method?
Edit: GMail doesn't support replace ..

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

The ReplaceRequest class implements the IReplaceRequest interface.

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

I tried it and it does nothing, either with a MimeMessage or a ReplaceRequest..
Maybe if you know an existing solution or someone who have done this before so I could investigate further?

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

I don't know if anyone trying to do what you are trying to do.

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

I'm just trying to edit a message and save the new version of it (in-place) or atleast delete older one, add the new one but with old date etc, but if same subject it will still bring old one for some reason idk why..

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

Instead of deleting the message on GMail, move it to the Trash folder (which will return the uid of the message as it will be in the Trash folder). Then open the Trash folder and expunge that uid.

In other words:

var trash = client.GetFolder (SpecialFolder.Trash);
var trashUid = client.Inbox.MoveTo(uid, trash);
trash.Open(FolderAccess.ReadWrite);
trash.Expunge(new UniqueId[] { trashUid });

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

I tried your code..
The message gets moved to trash, but the expunge doesn't do anything
Anyway continued with the code, and when saving new messages, it shows the old message without the new edits.

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

Sounds like it's just a feature of GMail then.

What you are trying to do is very non-standard behavior outside of Draft messages saved in the Drafts folder.

from mailkit.

xx7Ahmed7xx avatar xx7Ahmed7xx commented on August 15, 2024

So other IMAPs will work as expected using the whole code discussed here?

from mailkit.

jstedfast avatar jstedfast commented on August 15, 2024

Yes

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.