An electric door opener, comprising: - a box mountable on a frame of a door; - a latch provided with a housing configured for receiving a bolt mounted on a leaf of the door; - a rotating shaft of the latch between a locked position and an unlocked position of the bolt; - means for locking the rotational movement of the latch, able to be electrically actuated, and comprising an internal lever; and - an automatic mechanism for retaining the internal lever in an unlocked position of the latch from the moment the door opener is electrically actuated until the door is opened; wherein said automatic mechanism comprises: - a cam mounted on the latch on a rotating shaft coaxial or coinciding with the rotating shaft of said latch, said cam comprising: a front end arranged in the housing of the latch and forming a contact area of the bolt in the closed position of the door and, a rear end accessible through the rear area of the latch, - a compression spring that causes the cam to rotate towards an inoperative front position and, - a strap solidly attached to the internal lever, facing the rear end of the cam and which is elastically deformed by the action of the rear end of the cam and tends to move the internal lever towards an unlocked position of the latch when the door is closed and the bolt acts against the front end of the cam causing the rotation thereof into the latch; said strap moving the internal lever towards the unlocked position of the latch when the door opener is electrically powered, and retaining it in said unlocked position until the door is opened, the bolt stops acting against the cam and said cam returns to the inoperative position by the action of the compression spring. - a box mountable on a frame of a door; - a latch provided with a housing configured for receiving a bolt mounted on a leaf of the door; - a rotating shaft of the latch between a locked position and an unlocked position of the bolt; - means for locking the rotational movement of the latch, able to be electrically actuated, and comprising an internal lever; and - an automatic mechanism for retaining the internal lever in an unlocked position of the latch from the moment the door opener is electrically actuated until the door is opened; - a cam mounted on the latch on a rotating shaft coaxial or coinciding with the rotating shaft of said latch, said cam comprising: a front end arranged in the housing of the latch and forming a contact area of the bolt in the closed position of the door and, a rear end accessible through the rear area of the latch, - a compression spring that causes the cam to rotate towards an inoperative front position and, - a strap solidly attached to the internal lever, facing the rear end of the cam and which is elastically deformed by the action of the rear end of the cam and tends to move the internal lever towards an unlocked position of the latch when the door is closed and the bolt acts against the front end of the cam causing the rotation thereof into the latch; said strap moving the internal lever towards the unlocked position of the latch when the door opener is electrically powered, and retaining it in said unlocked position until the door is opened, the bolt stops acting against the cam and said cam returns to the inoperative position by the action of the compression spring.