You CAN use the US Mail to mail rifles and shotguns, but only a Dealer or Manufacturer can mail a handgun.
UPS can be used for rifles, shotguns, and handguns- BUT-
The "UPS Stores" are franchises, and cannot accept handguns. Those need to go to the UPS Hub- AND
UPS and FedEx (not law, their internal regs) requires that HANDGUNS be shipped Next Day Air. That is around $75. ALTERNATIVE- take handgun to an 01 FFL Dealer. Pay him (or her) to MAIL it to receiving dealer. Even paying him, say, $20, and the $10.45 for a a flat rate priority mail box, you are ahead of the game.
Talk to enough people, you will find people upset with service from UPS, Fedex, AND US mail. I have had decent results from all of them.
Generic advice- you can access UPS and FedEx tariffs on line. US Mail is the Domestic Mail Manual, section on "restricted mailings". You will always find someone that did not read their own regs, and will tell you "You can't do that.". Have a printout in your pocket of the regs cures that (Don't be snotty, now. ) If you are not a FFL holder, you must advise carrier that package is a firearm.
ANYONE that puts a post up here advocating that you call it machine parts, and ship it any way you want WILL get a some time off from the site. That is ILLEGAL and YES, you WILL get prosecuted.