added pdf generation
added mail sending support
minor interface changes