Fix Enigmail features broken with recent Enigmail change

Some features didn't work as before with recent Enigmail change.
I tried to fix it. Please check the commits. Thank you.