Hi All,
People have asked questions on how to modify Email compose screen's from dropdown list to not show Personal info as the first entry but as a last entry. Here is what you need to do.
In Emails/EmailUI.php, there is a function called getFromAccountsArray. Check th eif block in that code. It sets ieAccountsFrom variable with the users personal info. Push that if block after foreach loop so that the system entry will go at the end of from dropdown list. So here is the new code.
-SamirPHP Code:function getFromAccountsArray(&$ie) {
global $current_user;
global $app_strings;
$ieAccountsFull = $ie->retrieveAllByGroupIdWithGroupAccounts($current_user->id);
$ieAccountsFrom= array();
$oe = new OutboundEmail();
$system = $oe->getSystemMailerSettings();
$ret = $current_user->getPreferredEmail();
foreach($ieAccountsFull as $k => $v) {
$name = $v->get_stored_options('from_name');
$addr = $v->get_stored_options('from_addr');
if ($name != null && $addr != null) {
$name = from_html($name);
$ieAccountsFrom[] = array("value" => $v->id, "text" => "{$name} ({$addr})");
}
}
if(!empty($system->id)) {
require_once('modules/Administration/Administration.php');
$admin = new Administration();
$admin->retrieveSettings(); //retrieve all admin settings.
$ieAccountsFrom[] = array("value" => $system->id, "text" =>
"{$ret['name']} ({$ret['email']})");
}
return $ieAccountsFrom;
}


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks