How can I conditionally generate email addresses based on user input