Fixed pagination issue as well as added ability for customized emails