Fixed code for mail() sender.
Unit tests are working :)