Setting Email Signatures From Your MDM Platform

Have you noticed that most newer devices come preconfigured with something like “Sent from my Windows Mobile device” as the tag-line on emails? Have you been annoyed by this? Or worse – have you received emails from other people who have found out how to change this, and configure it to be something catchy/annoying?

Now as an ordinary user it’s ok. There is a default setting, and you feel ok with being left to your own devices (bad pun intended), and setting it to whatever you like at least for your own emails. But in an enterprise setting you may want to have a company standard, or go for a very neutral solution and remove it altogether.

And I’ve bet you’ve wondered which registry key contains this string if you’ve had these thoughts. Well, here’s the fun thing. There is no registry key to control this. As far as I am able to tell you can only configure this programmatically. A Google search will provide what you need of code to implement it in your own application, but I haven’t found a ready-made program that will let you do it. Granted – since there is an interface on the device for doing it, most members of the user base will be happy with that. But I want something I can trigger server side. So without further ado; I had to fire up my Visual Studio.

Now, obviously there’s a limit to how fancy you can make an application like this. But my basic requirement is an application that can run silently in the background with no user interface. The settings are stored in the registry so they can easily be configured through an MDM solution.

First, let’s have a look at what you can configure. This is what it looks like on your stock device.

You’ll notice that you can configure the actual signature, whether to use on “RE” and “FW” as well, and of course which message account it applies to. (Apply it to all your SMS messages!)

These are the same settings my application will use, and I’ve decided that you need to set the following registry keys to make it work:
STRING Signature
Default Value: “” (blank)

Use signature with this account
DWORD UseSignature
0 = Disabled, 1 = Enabled (default)

Use when replying and forwarding
DWORD UseReplyForward
0 = Disabled, 1 = Enabled (default)

Maybe you’re happy with my defaults (which are set at install time), or you can provision these settings yourself after installation. Here is an ADM template to do it from SCMDM, but the application will work with other MDM solutions as well:


CATEGORY "Windows Mobile Settings-Extended"
CATEGORY "Email Signature"

POLICY "Signature"
KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\\DojoSig\"
EXPLAIN "The signature that will be used."
PART "Signature:" EDITTEXT
VALUENAME "Signature"

POLICY "Enable Signature on emails"
KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\\DojoSig\"
EXPLAIN "Lets you enable or disable the use of signatures on emails sent from device."
VALUENAME "UseSignature"

POLICY "Enable Signature on reply/forward"
KEYNAME "SOFTWARE\Policies\Microsoft\Windows Mobile Settings\Registry\HKLM\SOFTWARE\\DojoSig\"
EXPLAIN "Lets you enable or disable the use of signatures on mail that is replied to and/or forwarded."
VALUENAME "UseReplyForward"


In the Group Policy Editor it should look similar to this.


One thing to be aware of – I only apply these settings to the default message store, which should be ActiveSync/Outlook on most devices. I have not included a setting that let’s you choose another message store.

I started out my implementation based on a blog post from the Windows Mobile team, and if you want to do your own implementation you can probably use it as well:

I’ll admit that my C++ was a little rusty as I do most utilities in C#, but there was no easy way to do it in managed code so I had to get my hands dirty. (Yes, I could have written a dll in C++, and used this in C# but that seemed overkill for something as “simple” as this. Or do messy P/Invokes to MAPI.) But enough of my problems as they say 🙂

The application is packaged in a cab as this sets the default registry keys, puts the executable in a folder, and run it once. I install a shortcut in the “Startup” folder, so it’s run every time the device is soft reset. This is to make sure the signature is set again if the policy is changed server side, or the user decides to change it. It’s not a proper interval method for reapplying, but I believe it’s good enough at the present time. You can rip the exe out of the cab and do it all manually if you like. There is no interface – running it will just read the registry and “do it’s magic”.

As there might be bugs, and I haven’t really written a lot of failsafe mechanisms in the code I consider it a Release Candidate. If nothing major comes up there will only be this release 🙂


8 thoughts on “Setting Email Signatures From Your MDM Platform”

  1. Me too. I thought that surely someone on the internet must have already come up with something I can use, but sometimes you have do things yourself if you want it done 🙂

  2. Many thanks for this. Looked for this everywhere and couldn’t find it. Any chance you can do a version that reads the signature from a text file? The registry key limits the text to 256 chars and my legal disclaimer in the signature is much longer (roughly 540 chars). Thanks much.

  3. I must admit I’ve never had a version 2 of this utility in mind – I mean it has a very limited purpose 🙂

    It would probably be possible to read from a text file. Would of course have to add some extra logic to handle whether the signature should be read from the registry key or the file though. The string can be a 16-bit string so it should be able to handle a large number of characters, but I do not know if the device will be limited to a lower number of characters.

    That being said legal disclaimers are possibly better to enforce on the Exchange server as the signature implemented on the device can be modified by the user.

    I’ll add it to my to do list as I have a couple of other projects going too, so I can’t make any promises and commit to a time frame 🙂

  4. I’m using your tool for the first time and it works great !!!!
    It will help me to manage the signature on all my devices.

    Thanks a lot Andreas to take some time in order to create this kind of application !

  5. Great tool, thanks! Would it be possible to add multi-line signature support to it?


  6. It should be possible. I had a brief look at it last year, but most likely there’s something buggy in my code because the line break wasn’t escaped correctly so it didn’t work as expected. I can try to take a look at it with fresh eyes, and see if I spot something obvious that would allow me to add multi-line support.

Leave a Reply

Your email address will not be published. Required fields are marked *