"At a high-level, unit testing refers to the practice of testing certain functions and areas – or units – of our code. This gives us the ability to verify that our functions work as expected. That is to say that for any function and given a set of inputs, we can determine if the function is returning the proper values and will gracefully handle failures during the course of execution should invalid input be provided."
http://code.tutsplus.com/articles/the-b ... --wp-25728
It's essentially automated testing, some people are for it and some aren't. I've always been the manual kind of guy myself.
EDIT: If I was going to implement unit testing for my email service, I would use
https://github.com/cmendible/netDumbster which is a fake SMTP server. I would then setup to use a local SMTP server (localhost) rather than using relay servers that I'm currently using. Then you setup the controller and the method that calls the sendmail function and then send. After that you could check the SMTP instance in code to see if it received the mail and if the contents match. I don't have any code for it as I haven't setup the unit tests project.