We study in some detail the next-to-minimal supersymmetric standard model w
ith gauge mediation of supersymmetry breaking. We find that it is feasible
to spontaneously generate values of the Higgs boson mass parameters mu and
B-mu consistent with radiative electroweak symmetry breaking. The model has
a phenomenologically viable particle spectrum. Messenger sneutrinos with a
mass in the range 6 to 25 TeV can serve as cold dark matter. It is also po
ssible to evade the cosmological domain wall problem in this scenario.