Fix wrong variable used as from email address when calling mail function