In this paper, we face the problem of delivering a given amount of goods in urban areas in a business-to-consumer (B2C) electronic commerce (EC) environment. This problem can be considered as a particular case of vehicle routing problem. As a novel issue, here we have to determine the fleet of no homogeneous vehicles to be used for satisfying the demands of clients coming from grocery e-channels, and their related itineraries, given the traveling limits imposed by the urban government; in fact, commercial vehicles are not allowed to go everywhere and can travel only in restricted daily time windows, according to their pollution emissions. We have to minimize the overall distribution costs, taking into account traveling components and setup ones, together with operative aspects and environmental issues; customer requirements, vehicle capacity and daily shift constraints have to be satisfied too. We outline the main characteristics of the problem in a B2C EC environment and propose a mixed integer linear programming model to solve this NP-hard problem. Computational results of test bed cases related to different sized transportation networks and delivery demands are presented and analyzed with respect to the fleet of vehicles chosen for satisfying the customer demand and the street traffic limitations. Then, a realistic case study derived from the e-distribution channel of a grocery company of Genoa, Italy, is reported. Considerations about CPU time and optimality gap are also given with the idea of making the proposed model effectively used and solved with any commercial software