Allow setting only default layout without specifying template in email config.

Closes #3336