refactored getting input in email parser example

Someone wondering how to use the parser can read the last line with less confusion, since the input-reading has been grouped into a single, separate section. Also, the default input is specified DRYly.