Notifier checking SMTP

I am using a Notifier to send confirmation messages… works well, but I
don’t know how to capture an error if the systme is not able to send
the message, in which cas I have to rescue the situation (delete a
record… messages…)

Is it possible to check the SMTP status before sending the notification
or
just trapping the error when the message could not be sent ?

thanks for your lights

kad