Snapple Fact #950: The first spam message was transmitted over telegraph wires in 1864.
YUP. According to The Economist, it was an advertisement for dentistry. “Messrs Gabriel, of 27 Harley Street, advised that their dental practice would be open from 10am to 5pm until October.”
We've had to deal with this nonsense for 150 years and it's as annoying now as it was then. Time also verifies this, though not the specific example given by The Economist: “the first unsolicited messages came over the wires as early as 1864, when telegraph lines were used to send dubious investment offers to wealthy Americans.” It appears that people and institutions would in fact receive unsolicited telegrams.
Now here's another interesting part: "Spam" (according to the same Time article) came about as a term in 1980 as a result of a Monty Python sketch. Definitely worth a watch - vikings and insanity abound.
Now back to our 1864 example. According to Curiosity.com and the above linked The Economist article, people dealt with it with far more indigence than we do. While we usually accept as an unavoidable reality of email, phone calls, etc., someone went as far as to write a complaint in The New York Times: "I have never had any dealings with Messrs Gabriel and beg to know by what right do they disturb me by a telegram which is simply the medium of advertisement?"