correct custom.js to send email