They actually are in some European countries. France included.
EDIT: Link to the law in question in the official site for FRance with English translation:
"From the day before the election at midnight, it is forbidden to distribute or have distributed newsletters, circulars and other documents.
From the eve of the poll at midnight, it is also forbidden to broadcast or cause any message that has the character of electoral propaganda to be disseminated by any means of communication to the public by electronic means."
https://www.legifrance.gouv.fr/affichCodeArticle.do?idArticl...