Context. Reliable estimates of the mass of coronal mass ejections (CMEs) are required to quantify their energy and predict how they affect space weather. When a CME propagates near the observer's line of sight, these tasks involve considerable errors, which motivated us to develop alternative means for estimating the CME mass. Aims. We aim at further developing and testing a method that allows estimating the mass of CMEs that propagate approximately along the observer's line of sight. Methods. We analyzed the temporal evolution of the mass of 32 white-light CMEs propagating across heliocentric heights of 2.5-15 R, in combination with that of the mass evacuated from the associated low coronal dimming regions. The mass of the white-light CMEs was determined through existing methods, while the mass evacuated by each CME in the low corona was estimated using a recently developed technique that analyzes the dimming in extreme-UV (EUV) images. The combined white-light and EUV analyses allow the quantification of an empirical function that describes the evolution of CME mass with height. Results. The analysis of 32 events yielded reliable estimates of the masses of front-side CMEs. We quantified the success of the method by calculating the relative error with respect to the mass of CMEs determined from white-light STEREO data, where the CMEs propagate close to the plane of sky. The median for the relative error in absolute values is ≈30%; 75% of the events in our sample have an absolute relative error smaller than 51%. The sources of uncertainty include the lack of knowledge of piled-up material, subsequent additional mass supply from the dimming region, and limitations in the mass-loss estimation from EUV data. The proposed method does not rely on assumptions of CME size or distance to the observer's plane of sky and is solely based on the determination of the mass that is evacuated in the low corona. It therefore represents a valuable tool for estimating the mass of Earth-directed events.Fil: López, F. M.. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - San Juan. Instituto de Ciencias Astronómicas, de la Tierra y del Espacio. Universidad Nacional de San Juan. Instituto de Ciencias Astronómicas, de la Tierra y del Espacio; ArgentinaFil: Cremades Fernandez, Maria Hebe. Consejo Nacional de Investigaciones Científicas y Técnicas; Argentina. Universidad Tecnológica Nacional; ArgentinaFil: Balmaceda, Laura Antonia. George Mason University; Estados Unidos. Consejo Nacional de Investigaciones Científicas y Técnicas. Centro Científico Tecnológico Conicet - San Juan. Instituto de Ciencias Astronómicas, de la Tierra y del Espacio. Universidad Nacional de San Juan. Instituto de Ciencias Astronómicas, de la Tierra y del Espacio; ArgentinaFil: Nuevo, Federico Alberto. Consejo Nacional de Investigaciónes Científicas y Técnicas. Oficina de Coordinación Administrativa Ciudad Universitaria. Instituto de Astronomía y Física del Espacio. - Universidad de Buenos Aires. Facultad de Ciencias Exactas y Naturales. Instituto de Astronomía y Física del Espacio; ArgentinaFil: Vásquez, A. M.. Consejo Nacional de Investigaciónes Científicas y Técnicas. Oficina de Coordinación Administrativa Ciudad Universitaria. Instituto de Astronomía y Física del Espacio. - Universidad de Buenos Aires. Facultad de Ciencias Exactas y Naturales. Instituto de Astronomía y Física del Espacio; Argentina. Universidad Nacional de Tres de Febrero; Argentin