Follow this link, Hope it helps:-

http://blog.qatestlab.com/2011/02/24/e-mail-distribution-of-test-results-obtained-from-selenium-testng/