Giter Site home page Giter Site logo

Comments (8)

matadan avatar matadan commented on August 28, 2024

from postal.

ikemuc avatar ikemuc commented on August 28, 2024

The first try was exactly the demo code with fetchLast() with 50 messages. It didn't work. Then I tried fetchLast() with 3 messages. Then I changed it to fetchMessages... Always the same problem...

from postal.

matadan avatar matadan commented on August 28, 2024

from postal.

ikemuc avatar ikemuc commented on August 28, 2024

Tested it with 0..10 just to make sure. Same problem.

I updated to 0.4.1 today, that didn't solve the problem...

from postal.

matadan avatar matadan commented on August 28, 2024

My issue was fixed with 0.4.1 but it sounds like you have a different issue.

from postal.

ikemuc avatar ikemuc commented on August 28, 2024

I shifted the initialization of postal to the init() method and now it works.

class KanbanManagerPostal {
var configuration: Configuration!

var messages: [FetchResult] = []

init(hostname: String, userName: String, password: String) {
    log.debug("init called...")
    
    configuration = Configuration(hostname: hostname, port: 993, login: userName, password: .plain(password), connectionType: .tls, checkCertificateEnabled: false)
    
    var postal: Postal = Postal(configuration: configuration)
[...]

from postal.

ikemuc avatar ikemuc commented on August 28, 2024

Now there are only the other questions unanswered ;-)

  • How can I debug the IMAP requests?
  • Where can I find a documentation of the API?
  • Can I manipulate a message, especially add custom headers to a message (or take a message, add custom headers, write it as a new message to the server and delete the old one...)?

from postal.

klefevre avatar klefevre commented on August 28, 2024

@ikemuc To answer your questions:

- How can I debug the IMAP requests?
You can set a closure on a Postal instance to have IMAP logs:

let postal = Postal(configuration: ...)
postal.logger { log in
    print(log)
}

- Where can I find a documentation of the API?

Unfortunately there isn't yet an official documentation of the API but we documented every public functions that you can access through xcode but I agree it's not enough. Everything should be ok to add jazzy or something like that if you want to do it, PR are welcome ! :)

- Can I manipulate a message, especially add custom headers to a message (or take a message, add custom headers, write it as a new message to the server and delete the old one...)?

No, Postal was first designed in first place only for fetching messages, not manipulating them. But I don't think it would be hard to add such features since libetpan propose an API for that.

Your issue seems fixed so I close it. If you want new features, please submit an issue and we'll figure out how to implement them as quickly as possible 👍

from postal.

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.