Esters Conversion to Amide
Conversion to Amides
Esters when reacted with amines produces corresponding amides. This reaction is also known as ammonolysis as the cleavage is promoted by the amine. Esters on reaction with ammonia (NH3) produces primary amides, on reaction with primary amines produces secondary amides, and on reaction with secondary amines produces tertiary amides.

Mechanism:

The reaction of amines with esters is not acid catalyzed because the protonation of amines take place in the presence of acids. Fortunately, the aminolysis of ester is faster than the hydrolysis of ester because the amines are more nucleophilic than the water nucleophile. However, the rate of reaction can be increased by heating the reaction mixture.
Unlike SN2 reactions, the leaving group RO- leaves in the second step of the acyl substitution reaction. This step of the reaction is highly exothermic. According to Hammond postulate, in exothermic the transition state is closer to the reactants in structure and energy. In this reaction the reactant is the tetrahedral intermediate. This shows that the rate of reaction is not much affected by the nature of the leaving group as the RO- is not a good leaving group in general.
Furthermore, once the amide is formed from the reaction of amines and esters it does not react with alcohol to reproduce ester.

The reason for this that RO- (alkoxide ion) is better leaving group than the H2N- (amide ion) since the pKa value of ROH is about 15 and pKa value of RNH2 is about 25. This shows that the conjugate base of ROH is weaker base than the conjugate base of RNH2.
The above shown mechanism can slightly be modified to show the tetrahedral intermediate bearing both RO- and RNH- leaving groups.

The base in above mechanism can be the alkoxide ion produced in the reaction or it can be the amine.