made text email work properly