adding fix for passwords which were being unset on subsequent config changes. Removing errors when no config options are present. Fixing send function error due to missing variable.