make email handling a bit more versatile