remove send mail from debugging code

Remove send email feature if the debug feature was enabled