Any voter who shall, before or during any election, directly or indirectly, by himself, or by any other person on his behalf, solicit, demand, receive, agree or contract for any money, gift, loan, or valuable consideration, office, place of employment, or solicit any endorsement on a note or other paper, public or private, for himself or for any other person, for voting or agreeing to vote, or for voting for any person or candidate or object, or agreeing so to vote, or from refraining or agreeing to refrain from voting at any election; or any person who shall, after any election, directly or indirectly, by himself, or by any other person on his behalf, solicit, demand or receive any money or valuable consideration on account of any person having voted or refrained from voting, or having induced any other person to vote or refrain from voting at any election, shall be guilty of a misdemeanor, and, on conviction thereof, shall be fined not more than $1,000, or confined in jail for not more than one year, or both, in the discretion of the court.