start to unify different mailer implementations

Change-Id: Ibc49d13417cd396b32a3bc73b994cab3375b355f
Merge "start to unify different mailer implementations"