• I would like to reccomend to not send email by port using CDOSYS in a stored proceedure. There are problems with doing this which may not manifest until right away. If you do so, you will probably run into an issue when setting one of the items in the configuration's fields collection (ie an access violation). Its best to send via pickup directory when calling CDOSYS via a stored proceedure. Another alternative is to put the codd into a vb script and to call via DTS. Over all sending using a pickup directory of a locally installed smtp server is better than sending via port: the proc code won't have to connect to a remote server, it will be more reliable (still works and is relaible if the networks or remote server has issues or is down) and will be much faster since the code can fire-and-forget (CDOSYS will just write the message file out to the local directory and your code is done). The SMTP server will handle things from there. I know many people don't want to install SMTP on a SQL server, however it does not take up many resources/processing time, its a system component and you get a much better and reliable configuration.

    A quick thing to remember for CDOSYS: 1 if by land (pickup) 2 if by sea (port)

    You may want to read my blog posting on issues with using CDOSYS under a stored proceedure.

    http://blogs.msdn.com/webdav_101/archive/2008/02/01/why-is-cdosys-failing-in-a-stored-proceedure.aspx

    I'll probably add more to the above blog entry later....

    Thanks,

    Dan