Results 1 to 6 of 6

Thread: xp_sendmail

  1. #1
    Join Date
    Jul 2004
    Posts
    268

    Unanswered: xp_sendmail

    Hi All,

    I have the following script that checks the amount of free space on the drive:

    declare @MB_Free int

    create table #FreeSpace(
    Drive char(1),
    MB_Free int)

    insert into #FreeSpace exec xp_fixeddrives

    select @MB_Free = MB_Free from #FreeSpace where Drive = 'J'


    if @MB_Free < 550
    exec master.dbo.xp_sendmail
    @recipients = 'test@yahoo.com',
    @message = 'Running low on free space'

    I can run it as a job step. However, the problem is that we don't have Microsoft Outlook to run xp_sendmail proc to get notify when the free space on the drive is low. I can run mailsend which is os command and add that as a job step. But I don't know how to combine the code above and mailsend, since one is the t-sql and the other one is command script. Any help is appreciated.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I use this, which may serve your needs:

    http://sqldev.net/xp/xpsmtp.htm
    Paul

  3. #3
    Join Date
    Jul 2004
    Posts
    268
    I don't have xp_smtp_sendmail stored procedure in the master db.

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    It should show up under Extended Stored Procedures, not Stored Procedures (presuming it's been installed as per the instructions).
    Paul

  5. #5
    Join Date
    Jul 2004
    Posts
    268
    I checked under extended sp and it is not there.

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Did you follow the installation instructions from the link? I did, and xp_smtp_sendmail shows up under Master/Extended Stored Procedures.
    Paul

Posting Permissions

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