smtp user config: checks if Felamimail is available
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 28 Jul 2014 16:47:26 +0000 (18:47 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 4 Aug 2014 08:20:52 +0000 (10:20 +0200)
Change-Id: I9b277a78a4dd4133f6cac7e5d6aa0b72dd64bcf4
Reviewed-on: http://gerrit.tine20.com/customers/903
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Admin/js/user/EditDialog.js

index c014909..a30e9d9 100644 (file)
@@ -590,9 +590,10 @@ Tine.Admin.UserEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
             ])
         };
         
-        var smtpConfig = Tine.Felamimail.registry.get('defaults').smtp;
-        var domains = (smtpConfig.secondarydomains && smtpConfig.secondarydomains.length) ? smtpConfig.secondarydomains.split(',') : [];
-        if (smtpConfig.primarydomain.length) {
+        // TODO how to fetch smtp config if Felamimail isn't installed?
+        var smtpConfig = Tine.Felamimail ? Tine.Felamimail.registry.get('defaults').smtp : null;
+        var domains = (smtpConfig && smtpConfig.secondarydomains && smtpConfig.secondarydomains.length) ? smtpConfig.secondarydomains.split(',') : [];
+        if (smtpConfig && smtpConfig.primarydomain.length) {
             domains.push(smtpConfig.primarydomain);
         }
         var app = this.app,