A California appellate court has upheld a state law regulating unsolicited commercial messages in a victory for Internet users annoyed by "spam" clogging their e-mail.

The court ruled that California can require "spammers" to identify their e-mail messages as advertisements. The court also said they must provide ways for recipients to get off mailing lists.

The unanimous decision by a three-judge panel of the 1st District Court of Appeal in San Francisco reversed a lower court's ruling that the 1998 law unconstitutionally interfered with interstate commerce.

The appellate panel said Wednesday that California was not trying to regulate the Internet, just the content of commercial messages that reached the state. The justices said the law served important public purposes.

Similar laws regulating Internet junk mail are in effect in 18 states, and federal laws have been proposed in Congress since 1994.