CapTech Interview Question

creating a function for a mail system