move prepare_email_link into get_email_link