Two men who sent millions of unsolicited pornographic e-mails have been sentenced to more than five years in federal prison as part of the first prosecution under a federal anti-spam law, U.S. Department of Justice officials said Friday.

Jeffrey A. Kilbride of Venice, Calif., and James R. Schaffer of Paradise Valley, Ariz., purchased e-mail addresses and sent the owners of those addresses links to pornographic Web sites, prosecutors said.

They were convicted in June of charges including conspiracy, money laundering, fraud and transportation of obscene materials after a three-week trial and were sentenced by a federal judge in Phoenix this week.

Defense lawyer Steven Goldsobel declined to comment Friday afternoon.

Prosecutors said that Kilbride and Schaffer, both 41, started their spamming business four years ago, earning more than $2 million in commissions.

They sent millions of unsolicited e-mails, prosecutors said. During nine months in 2004, Kilbride, Schaffer and an associate transmitted more than 600,000 spam messages advertising pornographic Web sites, according to court documents.

According to the indictment, Kilbride and Schaffer were paid commissions based on the number of people who accessed the Web sites using the spam messages.

Prosecutors said that after Congress passed a law known as the CAN-SPAM Act cracking down on unsolicited pornographic e-mails, Kilbride and Schaffer tried to make it seem like they were sending messages from abroad by logging in to servers in Amsterdam. But those messages originated from Phoenix, prosecutors said.

Kilbride and Schaffer were also ordered to forfeit $1.3 million.

Three other men charged in the case pleaded guilty and testified against Kilbride and Schaffer