/** * Get a list of available SMTP accounts * * Returns an array with all available SMTP accounts. This includes * on the one hand the self defined accounts and on the other hand the * local system account defined in the php.ini. * @global ADONewConnection * @see getSystemSmtpAccount() * @return array Array with SMTP accounts * @static */ static function getSmtpAccounts() { global $objDatabase; $arrSmtp[0] = SmtpSettings::getSystemSmtpAccount(); $objResult = $objDatabase->Execute('SELECT `id`, `name`, `hostname`, `username` FROM `' . DBPREFIX . 'settings_smtp` ORDER BY `name`'); if ($objResult !== false) { while (!$objResult->EOF) { $arrSmtp[$objResult->fields['id']] = array('name' => $objResult->fields['name'], 'hostname' => $objResult->fields['hostname'], 'username' => $objResult->fields['username']); $objResult->MoveNext(); } } return $arrSmtp; }