First, the recipient should check with his local dealer and get a signed copy of his license. Then he or the recipient sends that copy to the shipper. The shipper should make two additional copies, one to send in the package, the other to show/give to the carrier. The original signed copy should be kept to prove that the shipment was legal. That way, the receiving dealer knows the gun is coming, and is looking for it. Many dealers are reluctant to accept shipment, especially a handgun, from a non-dealer because it could be some kind of "sting." If things are worked out in advance, that concern may be alleviated. Still, going through a dealer at the sending end may be best anyway, due to the savings.
If the shipper is not an FFL dealer, manufacturer, or importer, he cannot use the U.S. Mail (USPS). If the shipper is in one of the above categories, he can ship by mail and should enclose a copy of his license with the shipment.
Here is another reason it is a good idea to keep on good terms with your local dealer(s). Buy from them if they have what you want, and they will be willing to do some favors for you when you need them.
Jim