[IMP] clean code and add cursor to fetch data in Mail_widget