Sandy Springs-based UPS will pay $40 million to resolve a federal investigation into its role in shipping drugs for illegal online pharmacies. The company cooperated with the investigation and will not be prosecuted, according to the agreement with the the U.S. Attorney’s Office for the Northern District of California. UPS will also put in place a compliance program aimed at ensuring illegal online pharmacies do not use its services to distribute drugs.