Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: passing a query to sp_send_cdosysmail

    I am looking for any help or hints on how to pass a query into or run a query as sp_send_cdosysmail as the body.

    I need some way other than using an attachment to return the results of a query from sp_send_cdosysmail as the body. Any good points in a direction would help!

  2. #2
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    XP_sendmail [BOL]


    This example sends the results of the sp_configure to Robert King.

    EXEC xp_sendmail 'robertk', @query = 'sp_configure'

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    Only problem with that is we don't want to install outlook on every sql machine we have.....


    Originally posted by Ruprect
    XP_sendmail [BOL]


    This example sends the results of the sp_configure to Robert King.

    EXEC xp_sendmail 'robertk', @query = 'sp_configure'

  4. #4
    Join Date
    Feb 2004
    Location
    San Antonio, TX
    Posts
    565
    just curious
    why not?

    sql mail works really well. you dont have to load anything but outlook.
    you could configure the msi with a transform file and deploy it with a group policy
    you could set the profile with a vb script so all you would have to do is log on wait for the install to finish and log off.

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    for the 16+ servers we would have to pay for an outlook license.


    Originally posted by Ruprect
    just curious
    why not?

    sql mail works really well. you dont have to load anything but outlook.
    you could configure the msi with a transform file and deploy it with a group policy
    you could set the profile with a vb script so all you would have to do is log on wait for the install to finish and log off.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •