updated email class to accept and use app_name and URL as vars.