Refactored long method for delivery messages