Vehicle energy management strategies main objective is to optimise the vehicle overall energy consumption and minimise harmful emissions. As vehicles become increasingly connected and gain access to larger amounts of information in relation to their surroundings and the road ahead, the potential benefit from predictive energy optimization (PEO) schemes increases. Such schemes attempt to predict future road events to enable the vehicle energy management to save energy by preparing for these events preemptively. An important parallel current trend is the development of Vehicle-to-X (V2X) communications which is expected to become a standard technology in the coming years. First applications of V2X have focused on increasing safety and convenience. However, V2X also unlocks new potential for PEO schemes as it can provide previously unavailable information to the vehicle, e.g. the future states of nearby traffic lights and the movement of other vehicles that are beyond the range of in-vehicle sensors. Using V2X information and eHorizon, a dynamic programming based optimization algorithm has been developed to determine both an optimal future speed profile and the optimal powertrain controls. The proposed algorithm is evaluated in the CarMaker simulation environment. Simulation results indicate a significant saving in vehicle overall energy consumption when compared to conventional autonomous and energy management functions. The proposed algorithm not only finds the optimal vehicle trajectories while considering various types of input information to adapt to the current situation but is also scalable and modular to be able to incorporate new types of future input information and to enable application across different powertrain architectures including hybrids. It also has potential to avoid prohibitive computation times for in-vehicle optimization that are typically the weak point of dynamic programming based strategies.