XPSMTP

  • I saw this url www.sqldev.net/xp/xpsmtp.htm in one of the topics here and it makes me wanna try xpsmtp to send mail to me and my superior whenever something happen in our database but it seems that i cant make it work.. can some one help me with this problem??

    declare @rc int

    exec @rc = master.dbo.xp_smtp_sendmail

    @server = N'Our_mail_server',

    @port = 25,

    @ping = 1

    select RC = @rc

    go

    It always displays 1 (means failure) i think the problem is with the @port variable do you think if i change it to the correponding port number of our mail server this xpsmtp will work?? I want to send a mail via MS Outlook

    "-=Still Learning=-"

    Lester Policarpio

  • Load xpsmtp80.dll file on database server to configure smtp mail extended stored procedure. Copy xpsmtp80.dll to C:\Program Files\Microsoft SQL Server\MSSQL\Binn

    Next, run the following statement in Query Analyzer on the master database on the target server to initialize xp_smtp_sendmail:

    Use Master

    GO

    exec sp_addextendedproc 'xp_smtp_sendmail', 'xpsmtp80.dll'

    GO

    Then use this code to send the e-mail:

    exec master.dbo.xp_smtp_sendmail

    @FROM = @mailfrom,

    @TO = @maillist,

    @priority = N'HIGH',

    @subject = @subject,

    @message = @msg,

    @server = N'SMTPSERVER'

  • Hi thanks for the reply i did that to install the dll in the server BINN I've spotted the problem. The problem is that our mail server disabled SMTP so i need to connect to another server and the command is up and running but again thanks for the effort very much appreciated 🙂

    "-=Still Learning=-"

    Lester Policarpio

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply