make email-sending work portably