The normal modes of electromagnetic fields satisfying three different
boundary conditions are constructed systematically. For each of these
cases, cavity quantization of the electromagnetic fields is carried ou
t explicitly. It is possible, using normal modes, to perform a unitary
transformation of the minimal-coupling Hamiltonian of an atom inside
the cavity to a multipolar form. It is shown that the boundary conditi
on plays an important role in the transition rates for the spontaneous
emission by the atom. Some explicit calculations are carried out for
several different boundary conditions. These results become consistent
with those for free space in the large-box limit.