You can also add an attachment like this
EXEC @hr = sp_OAMethod @oSmtp, 'AddAttachment', @result OUT, 'd:\test.jpg'
If @result <> 0
BEGIN
EXEC @hr = sp_OAMethod @oSmtp, 'GetLastErrDescription', @description OUT
PRINT 'failed to add attachment with the following error:'
PRINT @description
RETURN
END
Originally Posted by: ivan