This is a part of an article in the Economist. It seems spam has been a problem for quite a long time.
"On a May evening in 1864, several British politicians were disturbed by a knock at the door and the delivery of a telegram - a most unusual occurrence at such a late hour. Had war broken out? Had the queen been taken ill? They ripped open the envelopes and were surprised to find a message relating not some national calamity, but to dentistry. Messrs Gabriel, of 27 Harley Street, advised that their dental practice would be open from 10am to 5pm until October. Infuriated, some of the recipients of this unsolicited message wrote to the Times."
Of course, that gave even more publicity to the offending dentists.
"This was, notes Matthew Sweet, a historian, the first example of what is known today as "spam."