updated mailer action from json to php