adds email function into rails