The UK has made spam a criminal offence to try to stop the flood of unsolicited messages.
Spam said to make up half of all e-mails sent
Under the new law, spammers could be fined £5,000 in a magistrates court or an unlimited penalty from a jury.
But they would not be sent to jail, according to the new measures introduced by Communications Minister Stephen Timms.
Spam has become the bane of internet users, with junk messages making up more than half of all e-mails sent.
Permission to send
"It's crucial that people feel safe and have confidence in utilising electronic communication technologies," said Mr Timms.
"These regulations will help combat the global nuisance of unsolicited e-mails and texts by enshrining in law rights that give consumers more say over who can use their personal details. "
The measures take effect on 11 December and will be enforced by the Information Commissioner.
Under the new law, companies will have to get permission from an individual before they can send them an e-mail or text message.
But the regulations do not cover business e-mail addresses, despite some calls for a blanket ban on spam.
The anti-spam group, Spamhaus, has criticised the law for excluding work addresses.
"Britain has disappointed the internet community by actually legalizing the spamming of British businesses," said a Spamhaus statement.
"From 11 December it will be legal to send spam to the millions of hapless employees of British businesses.
"Britain's firms will continue to suffer the onslaught of ever more spam, now from spammers claiming legality," it said.
Jail in Italy
The British measures are not as drastic as Italian anti-spam laws.
Earlier this month Italy imposed tough regulations to fine spammers up to 90,000 euros (£66,000) and impose a maximum prison term of three years.
EU legislation banning unwanted e-mail is due to come into force on 31 October, but correspondents say that, given the global nature of the
internet, it may have little effect.
Most spam comes from the United States and Asia, and will be outside its reach.
The EU legislation leaves it to each member state how to enforce the legislation, as long as the enforcement is "effective".
In future, people will be able to insist that sites do not store their personal information.