email sending related utilities extracted from nemesis