Giter Club home page Giter Club logo

Comments (12)

GruberMarkus avatar GruberMarkus commented on May 28, 2024 1

DisableRoamingSignatures is not a Benefactor Circle feature.

When you set DisableRoamingSignatures to $false, Outlook synchronizes signatures with mailboxes in Exchange Online - BUT: Outlook can only synchronize in one direction, and that is from the cloud to the local machine, overwriting the local changes.

The problems you see are problems of Outlook's own sync mechanism, overwriting the signatures created by Set-OutlookSignatures and not handling encoding correctly.

You can overcome these problems with the Benefactor Circle add-on, as it supports the experimental MirrorLocalSignaturesToCloud parameter. When setting MirrorLocalSignaturesToCloud and DisableRoamingSignatures to $true, Set-OutlookSignatures takes care of uploading and downloading signatures from/to Exchange Online, and also avoids the problems with encoding.

You can find details about the MirrorLocalSignaturesToCloud parameter in the README file.

If you want to test the Benefactor Circle add-on, you can request a trial version from our partner ExplicIT Consulting at https://explicitconsulting.at/open-source/set-outlooksignatures/

Please let me know if this answers your question.

Edit: The next release will contain a warning when Outlook is allowed to sync itself, and the documentation will be updated to reflect this.

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024 1

Word is a bad HTML renderer in general, but it is ok for emails.

Other browsers usually don't care about the file encoding itself, but rely on the enconding defined in the HTML document, and they default to UTF8.

Word on the other hand uses a combination of both, with rules that are not documented and that I have not yet figured out in full. It gets even more complicated:

  • Windows-1252 and ANSI are nearly but not fully identical
  • Export results differ between countries, as Word uses the system locale codepage if not explicitely told otherwise.
  • Outlook uses codepage 65001 (UTF8) for .htm, but codepage 1200 (UTF16LE a.k.a Unicode) for .txt
  • And there is one more conversion happening when actually sending an email.

You are always on the safe side when exporting from DOCX to HTML by using UTF8 and defining UTF8 in HTML content.

This is what Set-OutlookSignatures does when creating signatures based on DOCX templates, and what the Benefactor Circle add-on does when downloading signatures from Exchange Online.

Outlook and Word do not stick to their own logic, and Microsoft is aware about it since about one and half years. Interestingly, this is only a problem with Outlook for Windows, as Classic and New Outlook for Mac handle everything correctly.

I will close this issue now. It was a please working with you!

I look forward to your evaluation of the Benefactor Circle add-on - it offers several features that your management and your communications and marketing departments might be interested in.

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024

Hi @di6parn,

The ending ".files" and ".filer" does not matter, if could be something completely different.

How could you configure Set-OutlookSignatures to sync signatures with Outlook Web? This feature is only available in the Benefactor Circle add-on.

from set-outlooksignatures.

di6parn avatar di6parn commented on May 28, 2024

Uhm, I simply used '-DisableRoamingSignatures $false' when running the script. I seem to have missed that it was for Benefactor Circle members only. 😳

EDIT: The readme file doesn't say anything about DisableRoamingSignatures being available only for Benefactor Circle members.

from set-outlooksignatures.

di6parn avatar di6parn commented on May 28, 2024

We have actually been utilizing this feature in Outlook/Exchange for a while, even before I started testing Set-OutlookSignatures, and we haven't had these problems in the past.

Today we send out empty "template" signatures to all our users, letting them add names and titles themselves and this is what we want to streamline more with Set-OutlookSignatures. The signatures we send out have been syncing to cloud without any problems, images and Swedish characters look as they should in Outlook on the web. But something happens to the signatures created by Set-OutlookSignatures.

I will examine the files further, to see if I can find anything. We have very few users that rely solely on Outlook on the Web, so it's possible this is not a real issue for us.

Thank you for your help!

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024

When you create a signature in Outlook and your mailbox is in Exchange Online, the signature is first created in Exchange Online and then downloaded to the local signature cache folder. When you change the file in the local signature cache folder, Outlook will overwrite the changes with the signatures saved in Exchange Online. Outlook does not upload signatures from the local signature cache folder to Exchange Online.

To achieve this with Set-OutlookSignatures, the Benefactor Circle add-on is required, so that you can use the MirrorLocalSignaturesToCloud feature.

Or do you just deploy sample signatures with Set-OutlookSignatures, and your users copy and modify them to their needs? In this case, the problem is a known problem with Outlook incorrectly handling encoding of roaming signatures.

Please provide the full output of Set-OutlookSignatures as text file, and please use the "-verbose" parameter. I will have a look at the log to get a better understanding of your situation.

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024

Hi @di6parn,

are you still interested in log file analysis, or should I close this issue?

If you want a log file analysis, please provide the full output of Set-OutlookSignatures as text file, and please use the "-verbose" parameter. I will have a look at the log to get a better understanding of your situation.

from set-outlooksignatures.

di6parn avatar di6parn commented on May 28, 2024

I must admit I don't have the full understanding of exactly how the sync process works, I can only describe how it seems to work here. 🙂

The sample signature we deploy was originally created in Outlook and the signature files (and corresponding folder) is being deployed to the users' signatures folder, %APPDATA%\Microsoft\Signatures. Most users (but sadly not all) edit the signature in Outlook. Our company name contains "Trollhättan", which is the city where we are based, so that word is included in the name of the signature file(s) as well as in the signature itself. This signature looks correct in Outlook on the Web, but it is not synced to cloud unless the Outlook client is started.

When I began testing Set-OutlookSignatures, I created two signature templates, one for external use and one for internal. Both had "Trollhättan" in their name. Since the image in the signature was lost in Outlook on the Web, I tried changing the name of one of the templates, replacing the ä with a, and after that the image was ok in Outlook on the Web. I suspected it had something to do with the encoding, so I compared the sample signature we deploy with the ones created by Set-OutlookSignatures. According to Notepad, the one we deploy has ANSI encoding, while the ones created by Set-OutlookSignatures has UTF-8 encoding.

I am attaching the log to this post, and I'm very thankful for any insight you can provide.

ScriptOutput.txt

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024

Could you also share a working and a non-working template, please?

from set-outlooksignatures.

di6parn avatar di6parn commented on May 28, 2024

Absolutely, here they are. The one named "Trollhättan Energi AB (webb)" is the one we deploy, the other two was created with Set-OutlookSignatures.
Signatures.zip

from set-outlooksignatures.

GruberMarkus avatar GruberMarkus commented on May 28, 2024

It has nothing to do with this issue, but I have seen it: Your logfile contains an Integrated Windows authentication error.
This might be related to your test account, but could also be a generic error in your configuration.

VERBOSE:       Authentication
VERBOSE:         Via IntegratedWindowsAuth
VERBOSE: There was an error parsing the WS-Trust response from the endpoint.
This may occur if there are issues with your ADFS configuration. See https://aka.ms/msal-net-iwa-troubleshooting for more details.

Possible reasons:

  • An account is not being available to perform IWA
  • An IWA policy is preventing auto-IWA authentication
  • Proxy or configuration issues prevent NTLM protocol (usually the case for 401 Negotiate/NTLM challenge presented by the endpoint for Windows authentication.

Back to signatures in general
Outlook uses Word as HTML renderer to show mails, and also to create signatures. HTML signatures are encoded in UTF-8, and also marked as such in the code ('<META content="text/html; charset=utf-8" http-equiv=Content-Type>'). Set-OutlookSignatures does exactly the same.

I tested with the string "Trollhättan" (copied, not typed, as the Swedish ä and the German ä could be different Unicode characters).
Signature created in Outlook contains encoding information (just as Set-OutlookSignatures does):

<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
[...]

Signature created in Outlook Web does not contain any encoding information, header, etc.:

<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">Trollhättan</div>

Most HTML renderers than assume UTF8, but not the renderer used by Outlook. The result is that Unicode characters such as German umlauts are not displayed correctly.

When you use the Benefactor Circle add-on, you disable Outlook's internal synchronization engine and rely on the one provided by the Benefactor Circle add-on. Downloaded and uploaded signatures than have the correct encoding, Unicode characters are displayed correctly.

While storing signatures in ANSI file encoding seems to solve the problem of the missing HTML encoding definition, it only works for certain characters: ANSI only defines 256 characters.

Now to your signatures:

  • 'Trollhättan Energi AB (webb) ([email protected]).htm' was not created by Set-OutlookSignatures, but manually.<brYIt seems to have been created in Outlook Web, or it was downloaded by Outlook from Outlook Web, as it is missing the encoding information, just as in the sample above.
    The file is saved in ANSI encoding, which may look like a solution, but is just a poor Workaround - depending on the characters used and the code page of your system, Unicode characters may be displayed correctly or not.
  • 'Trollhättan Energi ([email protected]).htm' has been created by Set-OutlookSignatures and contains encoding information.
  • 'Trollhattan Energi (Intern) ([email protected]).htm' has been created by Set-OutlookSignatures and contains encoding information.

The tests I have made and the data you have given me seem to confirm my standpoint: Outlook does not correctly synchronize signatures from Exchange Online.

With the Benefactor Circle add-on, Set-OutlookSignatures can replace the sync feature of Outlook with it's own mechanism that correctly handles encoding when uploading signatures to or downloading signatures from Exchange Online.

I see three possibilities:

  • Option 1: Keep Outlook's own sync enabled. You will have to live with the encoding problems until Microsoft solves them.
  • Option 2: Disable Outlook's own sync, and do not use the Benefacor Circle add-on. Signatures on devices and Outlook Web will not be synchronized.
  • Option 3: disable Outlook's own sync and use the mechanism of the Benefactor Circle add-on. Signatures on devices and Outlook Web will be synchronized, and encoding is set correctly.

If you want to test the Benefactor Circle add-on, there is a trial version available. Define a good test plan and make sure you have time to focus on tests, as trials are only issued once and are not prolonged. The documentation of the Benefactor Circle add-on is fully integrated into the documentation of the Free and Open Source (FOSS) version of Set-OutlookSignatures, so no additional documentation is required.

Please let me know if your questions are answered and if this issue can be closed.

Edit: You may want to wait a week or two before requesting a trial. v4.12.0 will bring some new features that could be interesting for you.

from set-outlooksignatures.

di6parn avatar di6parn commented on May 28, 2024

Thank you for taking your time to go through and explain this in such detail, I really appreciate it.

It occured to me that our own template signature was not created by me. It was created by the communications department, so I really have no idea how it was created. So I created two signatures in Outlook client myself, to test it, and I found this:

  • The first signature was named "Test" and it is indeed UTF-8 encoded even though the encoding information says <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
  • The second signature was named "Trollhättan" and the file is ANSI encoded (!) but it has the same encoding info <meta http-equiv=Content-Type content="text/html; charset=windows-1252">.

It seems to me that when the name of the signature contains swedish characters, Outlook/Word itself encodes it as ANSI. Both signatures look ok in Outlook Web. Could you verify this as well? I have attached the two signatures here as well.
Signatures.zip

Anyway, I appreciate the help I've been getting, and I really hope we can join the Benefactor Circle in time, but I will have to present this to management first. For now, we will probably move on with Option 1, as we don't have that many users that rely solely on Outlook Web. You may close this issue now, if you wish.

I will also look into the IWA problem you found, thanks for the heads up! I will try with a proper account to see if it has something to do with the test account I'm using.

Cheers,
Pär

from set-outlooksignatures.

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.