Shipping a snake UPS is NOT illegal - it's against their policy.
However, not labeling the box correctly indicating what is inside the box is a violation of the Lacey Act and a federal violation.
You may be thinking of shipping USPS, in which case, shipping snakes through them IS illegal.