remove unneccessary send mail code from the messaging js example