Update EmailsController.php

add index function