Fixes #517 'emailpmnotify' causes SQL error

For 1.8