AtvSoftware
Home
Products
About Us
Contact Us
« Return To Products //



Xp_smtp Extended Stored Procedure For MS SQL
Description How to Install How to Use How to Uninstall

Version: 4.1
Requirements: MS SQL Server
File Size: 229 KB
Download License: Free to Try

// Description

This application uses the MS SQL Server extended stored procedure xp_smtp to send email messages. To send email messages using this procedure you do not need to create a mail profile for the user account that is used to start an instance of the MS SQL Server. As well, it is not required to have any email clients installed. The extended procedure allows you to send HTML formatted messages.

Copy the xp_smtp.dll over to your SQL Server \Binn directory.

Add your new Extended Stored Procedure from a Visual Studio Data Project, or using the SQL Server Enterprise Manager, or by executing the following SQL command:

sp_addextendedproc 'xp_smtp', 'xp_smtp.dll'

exec master..xp_smtp{[@server =] 'server'
    [,[@port =] 'server port number']
    [,[@user =] 'user name']
    [,[@pwd =] 'user password']
    ,[@recipients =] 'recipients [;...n]'
    ,[@from =] 'from' }
    [,[@copy_recipients =] 'copy_recipients [;...n]'
    [,[@blind_copy_recipients =] 'blind_copy_recipients [;...n]'
    [,[@subject =] 'subject']
    [,[@message =] 'message']
    [,[@type =] 'type']
    [,[@attachments =] 'attachments [;...n]']

Parameters:
[@server =] 'server'
- The SMTP server name or IP address.

[@port =] 'server port number'
- The SMTP server port number. Default value is 25.

[@user =] 'user name'
- The user.

[@pwd =] 'user password'
- User's password.

[@recipients =] 'recipients [;...n]'
- The semicolon-separated list of the recipients of the mail.

[@from =] 'from'
- The sender of the mail.

[@copy_recipients =] 'copy_recipients [;...n]'
- The semicolon-separated list identifying the recipients of a copy of the mail (cc).

[@blind_copy_recipients =] 'blind_copy_recipients [;...n]'
- The semicolon-separated list identifying recipients of a blind copy of the mail (bcc).

[@subject =] 'subject'
- The parameter specifying the subject of the email.

[@message =] 'message'
- The message to be sent. The message can be up to 2Gb.

[@type =] 'type'
- The input message type. Only "text/plain" and "text/html" are valid.

[@attachments =] 'attachments [;...n]'
- A semicolon-separated list of files to attach to the email message.

You may drop the extended stored procedure by using the SQL command:

sp_dropextendedproc 'xp_smtp'

You may release the DLL from the Server (to delete or replace the file), by using the SQL command:

DBCC xp_smtp (FREE)

// Top Products   WinCrypto
  Xp_Pop3
  Xp_smtp
  Xp_adsi
  DB Event Alerter [MS SQL]
  DB Event Alerter [Postgre SQL]
  DB Event Alerter [Firebird]
  DB Event Alerter [MySQL]
  DB Event Alerter [Oracle]
  VFP Post_event Library

Go Back Go Up Go Forward Copyright © AtvSoftware 2025