Giter Site home page Giter Site logo

Raising events during getmessages about aenetmail HOT 6 OPEN

piher avatar piher commented on August 15, 2024
Raising events during getmessages

from aenetmail.

Comments (6)

andyedinborough avatar andyedinborough commented on August 15, 2024

Hmmm. Seems like something that could be done fairly easily in any code that uses the API by creating a simple wrapper. In trying to keep this thing as simple as possible, I'd need a really good reason for it to part of the base code.

from aenetmail.

piher avatar piher commented on August 15, 2024

I may be saying something very naive because I've never learned about wrappers but as an example when calling GetMessages(0,2000,....) i thought it would be of great comfort to trigger an event right after x.add(mail). (so we actually know what's going on inside)
Is that possible with a wrapper ?

from aenetmail.

andyedinborough avatar andyedinborough commented on August 15, 2024

I think some tracing is in order... I'll be thinking about the best way to implement this.

from aenetmail.

piher avatar piher commented on August 15, 2024

I'm sure that would be great. Just FYI, what I did for my personal use was to create a gotMsg event that is raised after x.add(mail), referencing the msg for saving or diplaying purposes, and added a boolean CancellationPending checked at every loop in getmessages to allow a (very) quick cancellation. So far it's been working great for what I need.

from aenetmail.

andyedinborough avatar andyedinborough commented on August 15, 2024

I've been meaning to get back to this. I think the best solution is Trace -- http://support.microsoft.com/kb/815788. Various points can be set to call the trace method and when you need to, you can create a TraceListener to see what's happening. Thoughts? What all points would you like to see a trace event fired? Connect, Login, each iteration of GetMessages...

from aenetmail.

piher avatar piher commented on August 15, 2024

Well, that would be great for testing purposes.
But actually I was not really thinking about testing, more of a new functionnality.
Indeed, I developped a small thunderbird-like email client and when I want to download the whole mailbox the memory usage would grow a lot whereas I don't even need the thousands of mails to be stored in a list since I save them one-by-one.
Raising an event at each message allowed me to write a sub that does the same thing as getmessages but "returns" every message one by one.

from aenetmail.

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.