added action mailer
json taken out of action mailer