Fixes #1663 System Email Logs - pagination SQL error

Fixes #1663