The thing about UDFs (User Defined Functions) is, you really don't have to let the code be so overwhelming, but instead just focus on what you need to provide it to work. In this case, the information you need to provide it is... the EXACT same information you provide blat. (In fact, it crossed my mind yesterday to update the function to assist those that still want to use blat and put all the variable in the right place). Look at the examples in the header. The advantage of the UDF is the CDO object it is based on, is baked right into every Win OS since XP, nothing to install, nothing to copy. \:\)

Most Exchange Servers do not allow relay so you would likely need to look into that before you could email from blat or sendmail. However, I have found that to be overly complicated. What I have done is something similar to what Glenn was talking about, I set up a hmailserver that is specifically designed to relay email for internal things like this. Hmailserver is one of the best couple of hours I've spent lately learning how to use it. It has IMAP and POP to, but you don't have to use them. Hmail has great documentation and the forums are active as well.