Fix command line error

closes #1871
- added check for mailConfig