Take a look at these two sites:
http://articles.techrepublic.com.com/5100-10878_11-6161839.html#
http://msdn.microsoft.com/en-us/library/ms190307.aspx
I am using the sp_send_dbmail to send emails for my Automated Unit Testing. I have not had much problems with...