[Pranav] Added test check if send_mail was called.