Improved code for setting delivery status
Add test code for checking delivery status and bounce reason