add preview generator to mailer generator

ref #1183