There are numerous ways of sending email from a sql server and allthough mine might not be the most elegant it has actually served me quite good for some time so I'll give it to you. It involves a free COM object from www.aspemail.com that you need to download and install on each server and the procedure below. Given that you have access to the servers and is able to install stuff on them and that you have access to an smtp server somewhere this should be plug'n'play:CREATE PROCEDURE sp_SMTPMail @ToAddress varchar(100), @FromAddress varchar(100), @Subject varchar(200), @Body varchar(8000)AS SET NOCOUNT ONDECLARE @object int, @hr int, @property varchar(255), @return varchar(255), @src varchar(255), @desc varchar(255), @Mailserver varchar(100)SET @Mailserver = 'smtp.mymailserver.com'-- First, create the object.EXEC @hr = sp_OACreate 'Persits.MailSender', @object OUTIF @hr <> 0 BEGIN -- Report any errors EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc GOTO END_ROUTINE ENDELSE -- An object is successfully created. BEGIN -- Set properties EXEC @hr = sp_OASetProperty @object, 'Host', @Mailserver IF @hr <> 0 GOTO CLEANUP EXEC @hr = sp_OASetProperty @object, 'From', @FromAddress IF @hr <> 0 GOTO CLEANUP EXEC @hr = sp_OASetProperty @object, 'Subject', @Subject IF @hr <> 0 GOTO CLEANUP EXEC @hr = sp_OASetProperty @object, 'Body', @Body IF @hr <> 0 GOTO CLEANUP EXEC @hr = sp_OAMethod @object, 'AddAddress', NULL, @ToAddress IF @hr <> 0 GOTO CLEANUP EXEC @hr = sp_OAMethod @object, 'Send', NULL GOTO CLEANUP ENDCLEANUP:-- Check whether an error occurred.IF @hr <> 0 BEGIN -- Report the error. EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc END-- Destroy the object.BEGIN EXEC @hr = sp_OADestroy @object -- Check if an error occurred. IF @hr <> 0 BEGIN -- Report the error. EXEC sp_OAGetErrorInfo @object, @src OUT, @desc OUT SELECT hr=convert(varbinary(4),@hr), Source=@src, Description=@desc ENDENDEND_ROUTINE:RETURN
--Lumbago"Real programmers don't document, if it was hard to write it should be hard to understand"