Don't configure ActionMailer settings if they're already configured

Fixes #2855