Updated send_async_mail and fixed the problem with its test.