opcode new media services



This SQL Server extended stored procedure can be used as a replacement for xp_sendmail. It removes the need to set up MAPI mailboxes and/or use Microsoft Exchange when all you need is the ability to send email from within SQL Server.

 Size: 48k


This component is free for non-commercial use. However if you want to use it in commercial (retail or in-house) software you must purchase a commercial version from here.

By downloading this software you indicate acceptance of these terms and assume all liability relating to it's use.

Installation and usage

Use the system stored procedure sp_addextendedproc to install the XP:
exec sp_addextendedproc 'xp_smtp', 
In the above example, the DLL has been copied to the SQL Server directory. Once it is installed, it can be used like so:
exec xp_smtp 'mail.server.com',
	'testing!','this is a test'
Calling the procedure with no parameters will show a short usage message.


The component uses the SMTP features of CDO to send the message. See this page on Microsft's site for more details.

Source code

If you'd like the source code, drop me a line at ianv@opcode.co.uk.

Play BattleFingers a fun new iPhone/iPod Touch game!
Free Downloads