This link probably has everything you want.
http://www.rondebruin.nl/sendmail.htm