Susanna Madora Salter, of Argonia, Kansas and a K-State alum (go Wildcats!), didn't even know she was on the ballot until election day:
A Woman's Christian Temperance Union had been organized in Argonia in 1883, and with the right to vote, its members made enforcement of the state prohibition law a prime issue of the  city election. They called a caucus and selected a ticket of men whom they considered to be worthy of the town's offices, regardless of political labels. In the absence of their president Mrs. Salter presided at this caucus.
A certain group of men in Argonia felt that the field of politics was their exclusive domain and resented the intrusion of women into their affairs. Two of these men had attended the W.C.T.U. caucus and heckled the proceedings. They were "wets," trying to intimidate the W.C.T.U., but when they attempted to nominate a candidate they were voted down.
A secret caucus was called by this faction. Twenty of them met in the back room of a local restaurant and decided to teach these females a lesson. They drew up a slate of candidates identical with that of the W.C.T.U., except that for the office of mayor they substituted Mrs. Salter's name. They assumed that the women would vote for the W.C.T.U. slate and that the men would not vote for a woman. They thought if Mrs. Salter got only their 20 votes it would embarrass the W.C.T.U. as a political organization. ...
This could be done as a surprise because candidates did not have to file before election day. The faction simply had the ballots printed with Mrs. Salter's name on them; of course without her knowledge or consent. Early voters on the morning of the election were shocked, therefore, to find that she was a candidate. The chairman of the Republican party in Argonia immediately sent a delegation to see her. They found her doing the family washing. They explained the trick and then asked if she would accept the office if elected. When Mrs. Salter agreed, they said, "All right, we will elect you and just show those fellows who framed up this deal a thing or two."
She won by a two-thirds majority and served a single term, which was politically uneventful but drew vast amounts of press attention. And a measure of anonymous scorn -- including one poet who unleashed the same "she's wearing the pants" attack as we saw 120 years later against Hillary Clinton, although with a great deal more linguistic finesse than we see today:
When a woman leaves her natural sphere,
And without her sex's modesty or fear
Assays the part of man,
She, in her weak attempts to rule,
But makes herself a mark for ridicule,
A laughing-stock and sham.
Article of greatest use is to her then
Something worn distinctively by men --
A pair of pants will do.
Thus she will plainly demonstrate
That Nature made a great mistake
In sexing such a shrew.
When bigots, with words dressed in meter
Attempt to make their poison sweeter,
They'd best enjoy the laugh;
For, in their weak attempts to mock
With no more logic than ad hoc,
They write their epitaph.
Anyway, as they say, read the whole thing.