implemented basic mail on registration