The Comstock Act, enacted in 1873 made it illegal by federal law to 'send obscene, lewd and/or lascivious' materials through the mail. The way the law was written, it was made to include any material regarding contraceptives. This not only included information, but the actual material itself!
The law in practicality banned condoms and other kinds of contraceptives. The law was in effect until 1936. This had some bad effects. For example, WWI, troops were sent abroad without condoms, which lead to more widespread STDs among troops. It wasn't until 1936, when an architect purposefully shipped a box of diaphragms from Japan with the intent to sue the government, that the law was finally repealed.