added hook for thunderbird mail mode