More robust email sending in background tasks. This is a low level update toke email sending more robust and easier to debug.