sendmail transport: better exception handling, wait for sendmail completion