module_dir;
$parent_id = $defines['focus']->id;
//martin Bug 19660
$userPref = $current_user->getPreference('email_link_type');
$defaultPref = $sugar_config['email_default_client'];
if($userPref != '') {
$client = $userPref;
} else {
$client = $defaultPref;
}
if($client != 'sugar') {
$class = $beanList[$parent_type];
require_once($beanFiles[$class]);
$bean = new $class();
$bean->retrieve($parent_id);
// awu: Not all beans have emailAddress property, we must account for this
if (isset($bean->emailAddress)){
$to_addrs = $bean->emailAddress->getPrimaryAddress($bean);
$button = "";
}
else{
$button = "";
}
}else{
$button = "