Finished implementing COD and sending mail