When an unregistered user submits a form for a custom post type, send an email that lets them delete their post

When an unregistered user submits a form for a custom post type, send an email that lets them delete their post

error code: 523