tests and stdin mail parsing  added