You're defining the email variable inside the completefunc function, so it's scoped to that function. When you return it, it's out of scope, so you're getting undefined.
Define the email variable at the top of your getSubmitterEmail function instead, and all will be well.
M.
Define the email variable at the top of your getSubmitterEmail function instead, and all will be well.
M.