converted email.js to funcjs arch