fix bug in reading MAILTO env var