Emails weren't sending properly.  Encoding was wrong.
Fixed program exit so failure is logged.