Wikipedia
The Mannich reaction is an organic reaction which consists of an amino alkylation of an acidic proton placed next to a carbonyl functional group by formaldehyde and a primary or secondary amine or ammonia. The final product is a β-amino-carbonyl compound also known as a Mannich base. Reactions between aldimines and α-methylene carbonyls are also considered Mannich reactions because these imines form between amines and aldehydes. The reaction is named after chemist Carl Mannich.
center|500px|Scheme 1. Ammonia or an amine reacts with formaldehyde and an alpha acidic proton of a carbonyl compound to a beta amino carbonyl compound
The Mannich reaction is an example of nucleophilic addition of an amine to a carbonyl group followed by dehydration to the Schiff base. The Schiff base is an electrophile which reacts in the second step in an electrophilic addition with a compound containing an acidic proton (which is, or had become an enol). The Mannich reaction is also considered a condensation reaction.
In the Mannich reaction, primary or secondary amines or ammonia, are employed for the activation of formaldehyde. Tertiary amines lack an N–H proton to form the intermediate enamine. α-CH-acidic compounds ( nucleophiles) include carbonyl compounds, nitriles, acetylenes, aliphatic nitro compounds, α-alkyl- pyridines or imines. It is also possible to use activated phenyl groups and electron-rich heterocycles such as furan, pyrrole, and thiophene. Indole is a particularly active substrate; the reaction provides gramine derivatives.