Added sendEmail command.

Squashed into 1 commit as @adamv requested in #18014! :)