File file = new File(attach);
input = new BufferedInputStream(new FileInputStream(file));
System.err.println("Attaching: " + file.getCanonicalPath());
}
attachment = Common.readFully(input);
mimetype = new Tika().detect(attachment);
System.err.println("Detected type: " + mimetype);
} catch (Throwable t) {
log.error("Could not read attachment: " + attach, t);
return 73; // "can't create output error"
} finally {