- remove the use of unsetenv

- add tests for empty envelope sender, and sender without @.
