Refactor std.email action

Closes-bug: #1392652

Change-Id: I308b28aae758b2b99b5ae5f39f8f74743544f00a
Merge "Refactor std.email action"