- Based on the ultrarelativistic quantum molecular dynamics (UrQMD) model, the effects of the density-dependent symmetry potential for baryons and of the Coulomb potential for produced mesons are investigated for neutron-rich heavy ion collisions at intermediate energies. The calculated results of the Delta-/Delta++ and pi -/pi + production ratios show a clear beam-energy dependence on the density-dependent symmetry potential, which is stronger for the pi -/pi + ratio close to the pion production threshold. The Coulomb potential of the mesons changes the transverse momentum distribution of the pi -/pi + ratio significantly, though it alters only slightly the pi- and pi+ total yields. The pi- yields, especially at midrapidity or at low transverse momenta and the p-/pi+ ratios at low transverse momenta, are shown to be sensitive probes of the density-dependent symmetry potential in dense nuclear matter. The effect of the density-dependent symmetry potential on the production of both, K0 and K+ mesons, is also investigated.