An inhaler for the oral administration of a pharmaceutical medium, having a housing with a mouthpiece, a container unit accommodated in an inhalation region of the housing and including a medium container and an outlet connector having an outlet orifice, which outlet connector is capable of being moved relative to the medium container for the purpose of triggering a discharging operation, and a discharge sensor for the detection of a discharging operation.The housing has a main portion and a detecting wall portion capable of movement relative to the main portion and which is configured and/or disposed for displacement relative to the main portion during a discharging operation, and the discharge sensor detects the displacement of the detecting wall portion in relation to the main portion of the housing.