Electronic nature of substituent X governs reaction mechanism in aminolysis of 4-pyridyl X-substituted-benzoates in acetonitrile.