State Laws on this subject may be different.
Rules to follow federally:
To transfer/sell a firearm interstate, you must ship the firearm to the FFL of the purchasers choice in the purchasers state of residence. If it is a handgun, you must ship it via private contract carrier, not USPS, unless you happen to be friends with an FFL who will send it for you. Then you can send it USPS.
Intrastate, it is perfectly legal. YMMV depending on state laws.