// set all previously supported headers as key->value pairs in msg
for (Pair props = properties; props != null; props = props.getNext())
{
if (!(props.getHead() instanceof Pair))
{
throw new RPCException("err.rpc.mailPropertyFormat");
}
Pair pair = (Pair)props.getHead();
Object name = pair.getHead();
if (!(name instanceof Symbol) && !(name instanceof String))
{
throw new RPCException("err.rpc.mailPropertyFormat");
}
String sName = name.toString();
if (sName.equals("CC"))
{
msg.setValue(Mail.CC, toAddress(pair.getNext()));
}
else if (sName.equals("BCC"))
{
msg.setValue(Mail.BCC, toAddress(pair.getNext()));
}
else if (sName.equals("Reply-To"))
{
msg.setValue(Mail.REPLY, toAddress(pair.getNext()));
}
else
{
throw new RPCException("err.rpc.mailProperty", new Object[]{sName});
}
if (props.getTail() != null && !(props.getTail() instanceof Pair))
{
throw new RPCException("err.rpc.mailPropertyFormat");
}
}
m_sender.send(msg);
}