Like almost every online retailer, Spice Jungle LLC emails tracking numbers to customers when they place orders. That’s why the small firm was dumbfounded when it received a demand to pay $25,000 for the right to do so.

It came from a company called Shipping & Transit LLC, which soon followed with a lawsuit saying the spice seller had infringed on its patents “through use of its electronic tracking, text, email and other messaging to customers.”

Spice...