Giter VIP home page Giter VIP logo

Comments (4)

ecederstrand avatar ecederstrand commented on September 25, 2024

Message.replty_all() is just a helper for the common case. If you have more complex requirements for your reply message, I would suggest to either call Message.create_reply() and adjust the returned item as needed:

my_reply = some_item.create_reply(...)
my_reply.body = HTMLBody(...)
my_reply.send()

or create the reply item from scratch exactly as you want it:

from exchangelib import ReplyToItem

my_reply = ReplyToItem(
    account=account,
    reference_item_id=ReferenceItemId(id=some_item.id, changekey=some_item.changekey),
    subject="Some subjectsubject",
    body=HTMLBody(...)
    ....
)
my_reply.send()     

from exchangelib.

claell avatar claell commented on September 25, 2024

I understand. I didn't know that the ReplyToItem (and ReplyAllToItem) was already correctly supported and just not fully accessible from the functions.

Personally, I'd probably would prefer extending the available functions so that they can be more versatile. However, that might also introduce backwards compatibility issues, and you might also have other good reasons for that.

Your first suggested method would also work based on the create_reply_all method, right?

Then, that looks like a good way; thank you very much for the support and suggestions!

I'll probably just play around to see how the new_body and body attributes of that class interact with each other, then.

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

Yes, the solution would be the same for create_reply_all().

While it would be possible to add all relevant options to the helper methods, it would be more confusing than helpful, I think, in case of new_body and body where it makes sense to provide one or the other, but not both.

from exchangelib.

claell avatar claell commented on September 25, 2024

Alright.

For the helper methods, that could be treated within the method, but especially as the argument body was previously mapped to new_body of the item object, changing that (or extending, or ...) would create more confusion.

I am closing this, then!

from exchangelib.

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.