Sanford Wallace, the man notoriously known as the "Spam King," has finally been convicted, with the federal judge in San Jose, Calif., sentencing the hacker to 30 months in prison on top of $310,000 in restitution.

Wallace's activities attracted the eye of authorities when his activities online ended up compromising over 500,000 Facebook accounts from the period of November 2008 to March 2009. During this time, Wallace sent approximately 27 million spam messages to Facebook users.

Wallace's messages prompted users to click on links to external websites, which in turn harvested his victim's login credentials. Even the friend lists of his victims were targeted as well. People in his victims' friend lists were then spammed as well, continuing the cycle.

It was not just Facebook users that Wallace spammed, either. Even users of Myspace, which was a prominent player on the social media stage at the time, were victimized as well. In 2007 and 2009, both Facebook and Myspace pursued him due to his spamming activities, ending with Wallace receiving almost $1 billion in fines from the two companies. Unsurprisingly, the amount was never collected.

In 2011, Wallace was finally hit with a criminal charge, which ultimately culminated in his recent conviction. Last year, while on trial, Wallace pleaded guilty to one count of fraud and related activity in connection with electronic mail. According to the law, the maximum sentence for such an offense is 36 months.

Prosecutors continually pushed for Wallace to receive the maximum sentence for his crimes, emphasizing that he was yet to receive any punishment for his activities.

"The defendant's history demonstrates that he has yet to suffer a consequence - other than a default judgment that cannot be collected -for his spamming activities. A sentence of 36 months' imprisonment will impress upon the defendant the seriousness of his actions and deter him from engaging in similar conduct again," prosecutors wrote in their pre-sentencing memorandum.

Wallace will be in jail for 30 months, which is just six months short of the maximum sentence.