Delivery of foaming agent