fixes send_email pylint+bugs (need more tests for it)