MAIL extension improvements

- BCC list was not iterated correctly
- improved readability of code