Updates to BuildEmail function