Sanford Wallace, perhaps best known by the moniker Spam King, pleaded guilty last year to charges of fraud and criminal contempt related to a phishing scam against Facebook. Between November 2008 and March 2009, Wallace gained unauthorized access to roughly half a million Facebook accounts and sent out more than 27 million spam messages.

Wallace also disobeyed an order not to access Facebook. He was originally expected to receive his sentence in December but the date got pushed back.

On Tuesday, Wallace learned that he’ll spend two-and-a-half years in prison followed by five years of supervised release. U.S. District Judge Edward J. Davila also ordered him to pay $310,628.55 in restitution according to the Office of the U.S. Attorney for the Northern District of California.

Wallace managed to automate the process of signing into a Facebook user’s account, scraping their list of friends then contacting each friend with a junk message that would trick them into giving up their account credentials. He would then direct the phished users to an affiliate site that paid him for the traffic.

Wallace got his start by sending junk faxes, a tactic that tied up recipients' phone lines and cost them money in the form of toner and paper. Recipients complained to federal authorities which eventually led to the creation of the Telephone Consumer Protection Act of 1991. With that avenue closed, he simply moved his spam business online where he’s been causing headaches for decades.

Wallace will begin serving his sentence on September 7, 2016.

Image courtesy Feng Yu, Shutterstock