Using JavaScript callback to conditionally send email
Your implementation will work but in my opinion you have made your code complicated for no reason. You are violating the "Single Responsibility" principle here by making your "checkMilestones" method do two things


Check if milestone is reached
Send email


You could have simplified this as follows:

(req.body.sessionThreeMileStones.length &lt;=3) ? sendMail() : doNothing();


This way your code is more readable and also easy to debug.