callData = "";
/*
* Getting some parameters from the configuration
*/
Configuration config = Configuration.getInstance();
String host = config.getValue(Constants.CHAPTER_SYSTEM, mDestination
.getName(), "Host");
String subject = config.getValue(Constants.CHAPTER_SYSTEM, mDestination
.getName(), "Subject");
Address fromAddress;
Address[] toAddresses;
try
{
String address = null;
Vector addressList = new Vector();
address = config.getValue(Constants.CHAPTER_SYSTEM, mDestination
.getName(), "ToAddress1");
int i = 1;
while (address != null)
{
i++;
addressList.add(address);
address = config.getValueOptional(Constants.CHAPTER_SYSTEM,
mDestination.getName(), "ToAddress" + i);
}
int amountAddresses = addressList.size();
toAddresses = new Address[amountAddresses];
for (int k = 0; k < amountAddresses; k++)
{
toAddresses[k] = new InternetAddress((String) addressList
.elementAt(k));
}
String fromAddressString = config.getValue(
Constants.CHAPTER_SYSTEM, mDestination.getName(),
"FromAddress");
String fromName = config.getValueOptional(Constants.CHAPTER_SYSTEM,
mDestination.getName(), "FromName");
if (fromName != null)
{
fromAddress = new InternetAddress(fromAddressString, fromName);
}
else
{
fromAddress = new InternetAddress(fromAddressString);
}
}
catch (Exception e)
{
throw new XException(Constants.LOCATION_EXTERN,
Constants.LAYER_TECHNICAL,
Constants.PACKAGE_TECHNICAL_MAIL, "0", e);
}
mUser = config.getValueOptional(Constants.CHAPTER_SYSTEM, mDestination
.getName(), "User");
if (mUser != null)
{
mPassword = config.getValue(Constants.CHAPTER_SYSTEM, mDestination
.getName(), "Password");
}
/*
* Setting the session