}
Class clazz = getClassForCommand(cmd);
if (clazz != null) {
ama = (AbstractMailCommand) clazz.newInstance();
// enable logging of the mail command
ama.enableLogging(getLogger());
// contextualize the mail command
if (ama instanceof Contextualizable) {
((Contextualizable) ama).contextualize(mailContext);
}
return ama;