Refactored email_links_controller