Giter VIP home page Giter VIP logo

Comments (15)

ecederstrand avatar ecederstrand commented on September 25, 2024

Weird. We don't specify any localization, I don't think the CreateItem service supports localization, and we don't hardcode any of those values.

from exchangelib.

claell avatar claell commented on September 25, 2024

Just to be sure, the wanted behavior is that the fields are in German, not English. Are you saying this should work, or that this isn't possible?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

I'm saying that it surprises me that your email client doesn't show these fields in the localization you chose in that client. We don't make any attempt in exchangelib to specify the localization of emails, AFAIK, so I'm curious what's different in the emails sent by exchangelib compared to the other emails in your inbox.

from exchangelib.

claell avatar claell commented on September 25, 2024

Ah, okay. I am using Outlook 365, so pretty standard client. Its language is German.

But are that really fields are dynamic, so they can be localized? To me, they just seem hardcoded in the message HTML body, no?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

Thy comparing two emails, one where the fields are localized, and one where they aren't. That will hopefully tell you what the difference is. You may have to dive into mime_content to find the difference.

from exchangelib.

claell avatar claell commented on September 25, 2024

After finding out, how to view the source in Outlook (and through exchangelib):

One from exchangelib:

<o:p></o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span style='mso-fareast-font-family:"Times New Roman"'><hr size=2 width="98%" align=center></span></div><div id=divRplyFwdMsg><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN-US'>From:</span></b><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN-US'> Ellsel, Claudius Matts<br><b>Sent:</b> Freitag, 25. August 2023 19:09:07<br><b>To:</b> Ellsel, Claudius Matts<br><b>Subject:</b> Test</span><span lang=EN-US style='mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-US'> <o:p></o:p></span></p><div><p class=MsoNormal>

And one from Outlook:

<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_MailOriginal"><b><span style="mso-fareast-font-family:&quot;Times New Roman&quot;">Von:</span></b></a><span style="mso-bookmark:_MailOriginal"><span style="mso-fareast-font-family:&quot;Times New Roman&quot;"> Ellsel, Claudius Matts &lt;[email protected]&gt;
<br>
<b>Gesendet:</b> Freitag, 25. August 2023 18:36<br>
<b>An:</b> Ellsel, Claudius Matts

Sorry in advance for the bad formatting etc. To me, it looks like the values are hardcoded in HTML? Or can this change dynamically?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

Yeah, that's Outlook applying its own formatting in HTML. exchangelib just sends a ReplyAllToItem item to the server and lets Exchange handle any formatting of the reply item.

You can do the same in exchangelib by creating an HTMLBody object that formats the reply the same way Outlook does it.

from exchangelib.

claell avatar claell commented on September 25, 2024

So the HTML is generated on Client side, not from the Exchange server or exchangelib?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

exchangelib doesn't do any automatic HTML formatting. That's out of scope of the library.

from exchangelib.

claell avatar claell commented on September 25, 2024

Okay. But I'd guess the HTML is then built by the Exchange server from the ReplyAllToItem? At least I never heard of a recipient client localizing HTML on the fly when viewing an email.

If that assessment is correct, maybe it's possible to tell the Exchange server how it should format the reply HTML?

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

I don't think it is. But if you want better control of the reply message, you can just create a full Message item where you specify the HTML body and other fields exactly the way you want it. ReplyToAllItem is just a helper to create simple replies.

from exchangelib.

claell avatar claell commented on September 25, 2024

Problem is that this manual approach will be error-prone and time-consuming.

Right now, it seems that it is not even clear where exactly these fields are added (Exchange mail server side or viewing email client side)?

If it's Exchange server side, maybe one can send additional information to it to tell it how one expects the server generated reply message to be localized.

from exchangelib.

ecederstrand avatar ecederstrand commented on September 25, 2024

Problem is that this manual approach will be error-prone and time-consuming.

That's exactly why we don't attempt to do it in this library. We're not Outlook, or a full-fledged email client, and don't want to be.

If it's Exchange server side, maybe one can send additional information to it to tell it how one expects the server generated reply message to be localized.

I haven't seen anything in the EWS docs on MSDN mentioning this possibility.

from exchangelib.

claell avatar claell commented on September 25, 2024

I haven't looked much into this and are not experienced with it, though. Maybe that item (https://learn.microsoft.com/en-us/exchange/client-developer/web-service-reference/replyalltoitem) doesn't support it, as you suggest. And possibly, Outlook doesn't use that item for their reply all feature, but also builds a full Message item for that.

from exchangelib.

claell avatar claell commented on September 25, 2024

For now, I understand that this is out of scope for this library and that either one would need to implement the functionality manually or find a way how to do this with EWS, so this library can add support for it.

I'll close this, then. Thank you very much for your support!

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.