implemented email sender (1 of several functions) + minor changes