mail_smtppass && $this->id) { $bean = new OutboundEmailAccounts(); $bean->retrieve($this->id); if(!$bean->mail_smtppass) { $GLOBALS['log']->warn("No mail SMTP password"); $this->mail_smtppass = null; } else { $this->mail_smtppass = $bean->mail_smtppass; } } $this->mail_smtppass = $this->mail_smtppass ? blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass) : null; $results = parent::save($check_notify); return $results; } public function retrieve($id = -1, $encode = true, $deleted = true) { $results = parent::retrieve($id, $encode, $deleted); $this->mail_smtppass = $this->mail_smtppass ? blowfishDecode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass) : null; return $results; } public static function getPasswordChange() { global $mod_strings; $html = << var passwordToggle = function(elem, sel) { $(sel).show(); $(elem).hide(); }
{$mod_strings['LBL_CHANGE_PASSWORD']} HTML; return $html; } public static function getEmailProviderChooser($focus, $name, $value, $view) { global $app_strings, $mod_strings; $ss = new Sugar_Smarty(); $ss->assign('APP', $app_strings); $ss->assign('MOD', $mod_strings); $ss->assign('mail_smtptype', $focus->mail_smtptype); $html = $ss->fetch('modules/OutboundEmailAccounts/smtpPreselection.tpl'); return $html; } public static function getSendTestEmailBtn() { global $app_strings, $current_user; $APP = $app_strings; $CURRENT_USER_EMAIL = $current_user->email1; $admin = new Administration(); $admin->retrieveSettings(); $adminNotifyFromAddress = $admin->settings['notify_fromaddress']; $adminNotifyFromName = $admin->settings['notify_fromname']; $html = <<